The combustion reaction is as expressed,
CxHy + O2 --> CO2 + H2O
The mass fraction of carbon in CO2 is 3/11. Hence,
mass of C in CO2 = (3.14 g)(3/11) = 0.86 g C.
Given that we have 1 g of the hydrocarbon, the mass of H is equal to 0.14 g.
moles of C = 0.86 g C / 12 g = 0.0713
moles of H = 0.14 g H / 1 g = 0.14
The empirical formula for the hydrocarbon is therefore, CH₂.