A 71.1 g sample of an unknown compound contains 10.1 g of hydrogen. What is the percent by mass of hydrogen in the compound?

When mercury oxide is heated, it decomposes into mercury and oxygen. If 32.8 g of mercury oxide decomposes, producing 3.0 g oxygen, what is the percent by mass of mercury in mercury oxide?

can you explain how you got your answer please NEEDS HELP

% w/w (m/m) = (grams material/total grams)*100

% = (10.1/71.1)*100 = ?

I think there is a problem with the second part of the question. The numbers don't add up.