\(n_{H_2}=\dfrac{1.12}{22.4}=0.05\left(mol\right)\)
\(MgO+2HCl\rightarrow MgCl_2+H_2O\)
\(Mg+2HCl\rightarrow MgCl_2+H_2\)
\(0.05..............................0.05\)
\(m_{Mg}=0.05\cdot24=1.2\left(g\right)\)
\(m_{MgO}=9.5-1.2=8.3\left(g\right)\)
\(\%Mg=\dfrac{1.2}{9.5}\cdot100\%=12.63\%\)
\(\%MgO=100-12.63=87.36\%\)