# Finding the enthalpy of formation of magnesium oxide

I have the following reactions:

\begin{align} \ce{Mg(s) + 2HCl(aq) &-> MgCl2(aq) + H2(g)}\\ \ce{MgO(s) + 2HCl(aq) &-> MgCl2(aq) + H2O(aq)}\\ \ce{H2(g) + 1/2O2(g) &-> H2O(l)}\\ \ce{Mg(s) + 1/2O2(g) &-> MgO(s)} \end{align}

I also have $\Delta H$ in $\mathrm{kJ/mol}$ for the first three reactions.

Out of this information, I need to find $\Delta H^\circ_\mathrm{f}{\left(\ce{MgO(s)}\right)}$.

I’m pretty sure I have to use Hess’ law but I don’t know how to apply it here. I’ve tried using the second reaction as my “main” reaction and then I can use the third and fourth reaction as formation reactions for two of the compounds of the main reaction but after that I’m not sure how to proceed.