Find out in the textbook or in Wikipedia (anode) what anode is when the battery is discharged and what is during electrolysis. Which problem is related to electrolysis? (only one). During the electrolysis, something is deposited on the electrode - you have two such reactions - one is clearly erroneous.
In cells during normal operation on the anode, more reactive metal is oxidized. Cell reactions are easy to write based on the cell scheme.