The cell reaction is
Mg+3Ag+→3Ag+M3+
Applying Nernst equations,
Ecell=E∘cell−0.05913log[M3+][Ag+]3
0.42=E∘cell−0.05913log(0.0018)(0.01)3=E∘cell−0.064
E∘cell=(0.42+0.−064)=0.484 volt
E∘Cell=E∘Cathode−E∘Anode
or E∘Anode=E∘Cathode−E∘Celll
=(0,80−0.484)=0.32 volt.