To answer this question you need a mole to mole ratio of C to H to O, since moles are a standard unit of measurement and are proportion to number of atoms (Avagadro's Number). This means we need to calculate the moles of each of these elements:
Carbon and Hydrogen we can easily calculate based on the mass of CO2 and H2O respectively:
Moles Carbon:
20.3 grams CO2 * 1 mole CO2/44 grams CO2 = 0.46 mole CO2 * 1 mole C/1 mole CO2 = 0.46 mole C
The ratio 1 mole C/1 mole CO2 is based on the fact that CO2 only has 1 Carbon.
Moles Hydrogen:
8.29 grams H2O * 1 mole H2O/18.02 grams H2O = 0.46 mole H2O * 2 mole H/1 mole H2O = 0.92 mole H
We know we have 8.29 grams of the unknown and based on our calculations of moles of C and H we can now convert these to grams since both the C and H contribute to the mass of the unknown. From there we can calculate the mass of O in grams:
0.46 mole C * 12 grams C/1 mole C = 5.52 grams C
0.92 grams H * 1 grams H/1 mole H = 0.92 grams H
H C O
8.29 grams = 0.92 grams + 5.52 grams. + ?
Based on this there are 1.56 grams O
which can be converted to moles to get the mole to mole ratio of C to H to O.
1.56 grams O * 1 mole O/18.02 grams O = 0.0975 mole O
O has the lowest mole count so we set relative number of moles of O to 1 in the empirical formula of the unknown and calculate C to O and H to O to get the empirical formula of the unknown:
C to O: 0.46 mole C/0.0975 mole O = 5 mole C/ 1 mole O
H to O: 0.92 mole H/0.0975 mole O = 9 mole H/ 1 mole O
Empirical Formula is C5H9O