(N/A) To write the chemical formulae,we use the valencies of the constituent ions:
$(i)$ Sodium $(Na^+)$ has a valency of $1$,and Oxide $(O^{2-})$ has a valency of $2$. By criss-crossing the valencies,we get $Na_2O$.
$(ii)$ Aluminium $(Al^{3+})$ has a valency of $3$,and Chloride $(Cl^-)$ has a valency of $1$. By criss-crossing the valencies,we get $AlCl_3$.
$(iii)$ Sodium $(Na^+)$ has a valency of $1$,and Sulphide $(S^{2-})$ has a valency of $2$. By criss-crossing the valencies,we get $Na_2S$.
$(iv)$ Magnesium $(Mg^{2+})$ has a valency of $2$,and Hydroxide $(OH^-)$ has a valency of $1$. By criss-crossing the valencies,we get $Mg(OH)_2$.