Answer:
Al(s) ⇄ Al³⁺(aq) + 3e⁻ (oxidation)
Mg⁺²(aq) + 2e⁻ ⇄ Mg(s) (reduction)
Explanation:
In the cell notation, first is placed the anode and then the cathode, so Al(s) is in the anode, where an oxidation reaction is taking place, and Mg²⁺ is in the cathode, where a reduction reaction is taking place. The half-reactions are:
Al(s) ⇄ Al³⁺(aq) + 3e⁻ (oxidation)
Mg⁺²(aq) + 2e⁻ ⇄ Mg(s) (reduction)
For the global reaction, it'll be necessary that the number of electrons (e⁻) is equal in the half-reactions, so the first one is multiplied by 2 and the second by three and the global reaction is:
2Al(s) + 3Mg⁺²(aq) ⇄ 2Al³⁺(aq) + 3Mg(s)