First, the mass of the oxygen must be calculated: 29.05 g - 18.02 g - 3.03 g = 8.00 g.
Converting each of those to moles yields 0.5 moles of oxygen, 1.5 moles of carbon, and 3.0 moles of hydrogen. Thus, for every one oxygen atom there are three carbon atoms and six hydrogen atoms.