The equation Eºcell = 0.0592/n logK must be used to find n and also Eºcell
2 Al(s) + 3 Mg2+(aq) → 2 Al3+(aq) + 3 Mg(s) Al3+ +3e- --> Al Eº = -1.66 V Mg2+ +2e- -->Mg Eº = -2.37V
To balance the equation, 6 moles of electrons must be transferred (2 Al and 3 Mg). This will be the value of n in the equation.
To find Eºcell, you need the reduction potentials which should be given in a table, and given above. Eºcell = -1.66 - (-2.37) = 0.71 V log K = Eºcell x n/0.0592 = 0.71 x 6/0.0592 log K = 71.95 K = 10^71.95 K = 1.1x10^72