We calculate first the number of moles of CO2 and H2O produced by dividing the given masses by the molar masses of CO2 and H2O.
moles CO2 = (12.9 g CO2) x (1 mole CO2 / 12 g CO2) = 1.075 moles.
moles H2O = (6.15 g H2O) x (1 mole H2O / 18 g H2O) = 0.36 moles
Then, we count the number of C, H, and O moles. This gives us 1.075 moles C, 2.5 moles O and 0.72 moles H. The empirical formula is,
C1.075H0.72O2.5
Simplifying,
C4H3O10