Chem question... 2 % is missing from my understanding this question. anyone?

If 0.050 mol of the hydrate Na2SO4 * x H2O loses 9.0g of water when it is completely dehydrated, the value of x in the formula for the hydrate is

the answer is 10.
What I tried was to change 9 grams of water into moles. 9 * 1/(2+16) = 0. 5 mol .
Since 9g of water is equal to 0.5 mol, H2O in reactant should equal to 0.5 mol. so 0.05 * 10 is equal to 0.5.

I am not even sure if these steps are correct. anyone?

well,
you are right.
here. 0.05 moles of the reactant gives 0.5 moles of water
so 1 mole.of the reactant will give 0.5/0.05 moles which is 10 moles.
that means in every 1 mole of the reactant there will be 10 mole h20.
likewise in every molecule of na2so4 there will be 10 h2o!