The underlying chemical equation here is
2H2 + O2 ---> 2H20 , which you can use to figure out what the mole ratio is between compounds
In this case we have 32 g / 32 g/mol = 1.0 mol of O2 and the ratio between O2 and H2O from the equation is 2:1, meaning that
Moles H2O = 1.0 mol O2 x 2 mol H2O / 1 mol O2 = 2.0 mol H2O
Finally then you want to convert that value over into grams by multiplying by the Molar Mass
2.0 mol H2O x 18.02 g/mol = 36.04 g
meaning that this scenario will produce 36.04 grams of water