This may seem confusing because they give you two masses, but all you have to do is pick one to do the calculations. Personally, I would pick O2, since the molar mass is easier to calculate. The answer would be 3.3 g (rounded for sig figs). To get this, first take the 5.9 grams of O2 and convert it to moles by dividing by the molar mass of oxygen gas, which is 32. Then, multiply both by the mole-mole ratio, which is 2:2, or simply 1:1. After that, multiply that by 18g, which is the molar mass of water to get grams of water.
REMEMBER, you have to write and balance the chemical equation before you can do any of that work.
That happens to be CH4 + 2O2 => CO2 + 2H2O
Basically this is used in calculating the nuclear binding energy by converting the mass defect (calculated first) to energy and if we recall, Einstein's equation E=mc2 is the perfection equation to use because E=mc2 in which E represents units of energy, m represents units of mass, and c 2 is the speed of light squared.