The standard reduction potential of the half cells are given.
E∘Ni2+(aq)/Ni(s)=−0.28 V
E∘Mg2+(aq)/Mg(s)=−2.37 V
Metal which having higher reduction potential will undergo reduction and metal having lower reduction potential will undergo oxidation.
Thus, Ni electrode will act as cathode and Mg electrode will act as anode.
The standard cell potential (ΔEo) of a galvanic cell can be calculated by considering the standard reduction potentials of the two half cells Eo.
E∘cell=SRP of substance reduced−SRP of substance oxidised
(SRP - Standard reduction potential)
E∘cell=E∘cathode (red)−E∘anode (red)
E∘cell=E∘Ni2+(aq)/Ni(s)−E∘Mg2+(aq)/Mg(s)
E∘cell=−0.28−(−2.37)
E∘cell=−0.28+2.37
E∘cell=2.09 V