A hydrocarbon is only composed of C atoms and H atoms. To get the empirical formula, get the moles of C and H.
The molar mass of CO2 is 44 g/mol and that of H2O is 18 g/mol.
moles CO2 = 17.9 g / (44 g / mol) = 0.407 mol
There is 1 mole of C per 1 mole of CO2, hence:
moles C = 0.407 mol
moles H2O = 9.14 g / (18 g / mol) = 0.508 mol
There is 2 moles of H per 1 mole of H2O, hence:
moles H = 0.508 mol * 2 = 1.02 mol
So so far we got:
moles C = 0.407 mol
moles H = 1.02 mol
Divide the two by the smallest number of moles, so divide by 0.407 mol:
C = 0.407 / 0.407 = 1
H = 1.02 / 0.407 = 2.5
Since there cannot be a decimal number of atoms, so multiply both by 2:
C = 1 * 2 = 2
H = 2.5 * 2 = 5
So the empirical formula is:
C2H5 (ANSWER)