mols CO2 grams/molar mass CO2 = about 7.7 = mols C.
mols H2O = grams/molar mass H2O = 138/18 = about 7.7 so mols H atoms is twice that or about 15.4
Now find the ratio. The easy way is to divide everything by the smaller numbr
C = 7.7/7.7 = 1.00
H = 15.4/7.7 = 2.00
So empirical formula is CH2
Empirical formula mass is 12 + 2 = 14
Molecular formula is 14 * n = 78 and n is 78/14 = about 5.57 which we round to 6 and molecular formula is (CH2)6 or C6H12
Note: 5.57 is a little too close to 5.5 to be rounding up or down. If I did this in the lab I would redouble my efforts to obtain a more accurate molecular weight of CxHy than 78.