Hi the following comes from my first homework assignment in AP Chemistry. I am totally lost on this question and don't know where to start. Thanks a lot in advance!!!!!

A 0.1247 g sample of ascorbic acid, Vitamin C, was burned in a carbon-hydrogen combustion apparatus to produce 0.1869 g of carbon dioxide, and 0.0510 g of water. Ascorbic acid contains only carbon, hydrogen, and oxygen. Determine the masses of C,H, and O in the sample and then determine the simplest formula.

Convert 0.1869 g CO2 to g C.

0.1869 g CO2 x (1 mol C/1 mol CO2) = ?? g C.

Convert 0.0510 g H2O to g H.
0.0510 g H2O x (2 mols H/1 mol H2O) = ?? g H

Determine g oxygen by adding g C and g H and subtracting from the 0.1247 g sample initially taken.

Then the simplest (empirical formula) is determined by converting g C, H, and O to mols
mols C = g C/atomic mass C = xx mols C.
mols H = g H/atomic mass H = xx mols H.
mols O = g O/atomic mass O = xx mols O.
Now find the ratio of the three in simplest numbers; i.e., divide the smallest number by itself (thereby making it 1.00) and divide the other two numbers by the smallest number. Post your work if you get stuck.

To solve this problem, you will need to use the concept of mass conservation. The total mass of the reactants (ascorbic acid) must be equal to the total mass of the products (carbon dioxide and water).

Step 1: Calculate the mass of carbon in the sample.
The molecular weight of carbon dioxide (CO2) is 44 g/mol. So, to find the mass of carbon, you need to determine the number of moles of carbon dioxide produced, and then multiply it by the molar mass of carbon.

Number of moles of carbon in CO2 = mass of carbon dioxide / molar mass of CO2
= 0.1869 g / 44 g/mol

To calculate the mass of carbon, multiply the number of moles of carbon by the molar mass of carbon (12.01 g/mol).

Mass of carbon = (0.1869 g / 44 g/mol) * (12.01 g/mol)

Step 2: Calculate the mass of hydrogen in the sample.
The molecular weight of water (H2O) is 18 g/mol. So, to find the mass of hydrogen, you need to determine the number of moles of water produced, and then multiply it by the molar mass of hydrogen.

Number of moles of hydrogen in H2O = mass of water / molar mass of water
= 0.0510 g / 18 g/mol

To calculate the mass of hydrogen, multiply the number of moles of hydrogen by the molar mass of hydrogen (1.01 g/mol).

Mass of hydrogen = (0.0510 g / 18 g/mol) * (1.01 g/mol)

Step 3: Calculate the mass of oxygen in the sample.
To get the mass of oxygen, subtract the total mass of carbon and hydrogen from the total sample mass.

Mass of oxygen = Total sample mass - (Mass of carbon + Mass of hydrogen)

Step 4: Determine the simplest formula.
To find the simplest formula, divide the mass of each element by the atomic mass of that element and divide each result by the smallest value obtained. Round the resulting ratios to the nearest whole number as necessary. The whole number ratios will give you the simplest formula.

For example, if the mass of carbon is 10 g, the mass of hydrogen is 20 g, and the mass of oxygen is 5 g, the simplest formula would be C2H4O1, which can be simplified to CH2O.

By following these steps, you should be able to determine the masses of carbon, hydrogen, and oxygen in the sample and then determine the simplest formula.