Hi Selene,
For the first part of the question, we need to divide the mass composition of each element by its molecular mass, and then normalize the result by the lowest value.
C H O
Mass (g) 47.37 10.59 42.04
Molar mass (g/mol) 12.011 1.01 16.0
Mass/molar mass 3.944 10.485 2.628
Divide by smallest 1.5 3.99 1
Normalize to nearest ~3 ~8 2
whole number
Empirical formula: C3H8O2
For the second part, a constant n is introduced, which is required to scale up the molecular mass of the empirical representation, i.e.,
(C3H8O2) * n = 228.276 g/mol
(3*12.011 + 8*1.01 + 2*16) * n = 228.276
76.113 * n = 228.276 g/mol
n = 3
Thus, the molecular formula is (C3H8O2) * 3
= C9H24O6
47.37 grams of carbon, 10.59 grams of hydrogen, and 42.04 grams of oxygen