If the oxidation potential of Mg and Al are +2.37 volts and + 1.66 volts…