In order to find the percent composition by mass of each element, you will follow the following step:
Step 1: Determine the molar mass of Ba(OH)2
[tex]\begin{gathered} Ba(OH)_2=137.327+2(16)+(2.016) \\ Ba(OH)_2=137.327+32+2.016 \\ molar\text{ mass of Ba\lparen OH\rparen}_2=171.359gmol^{-1} \end{gathered}[/tex]Step 2: Determine the composition by mass of each element
For Barium element
[tex]\begin{gathered} \%Ba=\frac{137.327}{171.359}\times100\% \\ \%Ba=0.8014\times100 \\ \%Ba=80.14\% \end{gathered}[/tex]For Oxygen element
[tex]\begin{gathered} \%O=\frac{32}{171.359}\times100 \\ \%O=0.1867\times100 \\ \%O=18.67\% \end{gathered}[/tex]For the oxygen element
[tex]\begin{gathered} \%H=\frac{2.016}{171.359}\times100 \\ \%H=0.0118\times100 \\ \%H=1.18\% \end{gathered}[/tex]