Answer
H = 76.10%
P = 7.82%
O = 16.16%
Procedure
Considering the compound Hg₃(PO₄)₂
To calculate the percent composition by mass of each element first you need to calculate the total mass of the compound using the molecular weights.
Data from the periodic table
Hg= 200.59 g/mole
P = 30.97 g/mole
O =15.99 g/mole
Molecular weight per type of atom in one molecule
Hg= 200.59 g x 3 = 601.77 g
P = 30.97 g x 2 = 61.94 g
O =15.99 g x 8 = 127.92 g
Total mass = 601.77 + 61.94 + 127.92 = 791.63
Percent masses
h