Would you minus the 0.989-2.024 and then use Avogadro's number to find out the molecules??
Not bad (although looks like you got it reversed and you will have negative mass of water), just do it separately for MgSO
4 that was left after heating and for water that left the compound - that will tell what was their ratio in the original compound.
Or - instead of going through molecules - go through moles. Don't calculate percentages, just go for mass of anhydrous sulfate and mass of water removed, convert them to moles and calculate ratio. Same final result.
And yes, 7 is a correct one.