To find the ratio of atoms in a compound, we must divide the moles of carbon by the moles of hydrogen.
Moles of C: #"0.198 g " CO_2 * ("1 mole " CO_2)/("44.01 g " CO_2) * ("1 mole " C)/("1 mole " CO_2) = "0.0045 mole C"#
In this case, 44.01 g is the molar mass of #CO_2#. You must multiple by #("1 mole C")/("1 mole " CO_2)# in order to convert from moles of #CO_2# to moles of #C#.
Moles of H: #"0.1014 g " H_2O * ("1 mole " H_2O)/("18.016 g " H_2O) * ("2 mole " H)/("1 mole " H_2O) = "0.0112 mole H"#
In this case, 18.016 g is the molar mass of #H_2O#. You must multiple by #("2 mole H")/("1 mole " H_2O)# in order to convert from moles of #H_2O# to moles of #H#.
Now, all that's left is to find the ratio of #C# and #H#:
#("0.0045 mol " C) / ("0.0112 mol " H) = 0.4018 = 0.402#