We need to first figure out how many carbons and hydrogen are from the products since they came from the hydrocarbon.
18.6 g (1 mol CO2/ 44 grams)( 1 mol C/ 1 mol CO2)= 0.423 moles C
6.36 g (1 mol H2O/ 18.02 grams)(2 mol H/ 1 mole H2O)= 0.706 mol H
Divide the both values by the smallest and multiple by any number until you get the smallest whole number
Carbon- 0.423/0.423= 1 x 3= 3
Hydrogen- 0.706/ 0.423= 1.7 x 3= 5
The formula is C3H5