Let's start by balancing the equation. We can see that, as written, we have one oxygen coming in, but two (O2) in the product side.
H2O → H2 + O2
Let's try making it 2 H2O and see what happens:
2H2O → H2 + O2
That took care of the O's, but now we have two extra H's coming in. So let's add a "2" to the H2 to the product side:
2H2O → 2H2 + O2
Now it is balanced. 4 hydrogens and 2 oxygens coming in, and 4 hydrogens and 2 oxygens going out.
Now we can calculate the amounts of both products. We are given 10.0 grams of H2O (note that we have 3 sig figs here). Convert that to moles H2O by dividing it by water's molar mass of 18 grams/mole. That gives us 0.556 moles of water. We can see from the balanced equation that we only get 1 mole of O2 for every 2 moles of H2O, a molar ratio of 1/2. So if we start with 0.556 moles of water, we'll get (1/2)*(0.556 moles) of O2. That is 0.278 moles of O2. Convert that to grams by multiplying it by oxygen's molar mass of 18 grams/mole: 8.89 grams O2.
Do the same type of analysis for H2. Here, the molar ratio of H2/H2O is 1 = we get the same number of moles of H2 as we have of H2O coming in, which for us is 0.556 moles. Convert that to grams hydrogen by multiplying by hydrogen's molar mass of 2 grams/mole. That gives us 1.11 grams of H2.
A nifty check on our work would be to see if the mass of the reactants equals the mass of the products, as it should due to the conservation of mass law.
O2 8.89 grams
H2)L 10.0 grams