So a mole is basically the amount of substance you have and is an SI unit. In one mole you will have Avogadro's number (Avogadro constant) of atoms. You convert mass to moles as you did in the first step but 1 mole of oxygen has the same number of atoms as one mole of hydrogen. So you can convert simply to moles of oxygen and then moles of hydrogen to get the grams of hydrogen.
[itex]99 g\, O_{2}\cdot \left (\frac{1\, mol\, }{2 \cdot Y \, g} \ O_{2} \right ) \cdot \left [ \left (\frac{6.022*10^{24} atoms}{mol} \ O_2 \right ) \cdot \left (\frac{mol}{6.022*10^{24} atoms} \ H_2 \right )\right ]\cdot \frac{2 \cdot X \, g}{1\, mol\, } \ H_{2}
[/itex]
Non-latexThe part in the square brackets [] you do not need.
Edit: removed final answer and some specifics.