Firstly we will calculate the mass of the molecule by adding the together the atomic mass of each element:
[tex]\begin{gathered} Mg:24.31g \\ O:16.00g \\ H:1.00g \\ _mMg(OH)_2=24.31+(16.00\times2)+(1.01\times2) \\ _mMg(OH)_2=58.33gmol^{-1} \\ \\ \\ Na:22.99g \\ O:16.00g \\ H:1.01g \\ _mNaOH=22.99+16.00+1.01 \\ _mNaOH=40gmol^{-1} \end{gathered}[/tex]Now we will determine the percentage mass of each of element:
[tex][/tex]