Normally these questions ask for the empirical formula of the compound. You want mass%, so you get mass%: Mass C in 7.93mg CO2 Molar mass CO2 = 12.011+15.999*2 = 44.009g/mol Molar mass C = 12.011 Mass C = 12.011/44.009*7.93 = 2.1643mg C
Mass H in 4.87mg H2O Molar mass H2O = 1.008*2+15.999 = 18.015g/mol Molar mass H2 = 1.008*2 = 2.016 Mass H in 4.87mg H2O = 2.016/18.015*4.87 = 0.545mg H
Mass O = 5.59 -(2.1643 + 0.545) = 2.8807mg
% mass composition: C = 2.1643/5.59*100 = 38.71% H = 0.545/5.59*100 = 9.750% O = 2.880/5.59*100 = 51.52%