Solute mole fraction for hydrated magnesium sulfate dissolved in water
Alright, let’s take this one step at a time.

First of all, you want to determine a molecular formula, and among your known data you have a mole fraction. This suggests it’s a good idea to work with moles to solve the problem. As such, the first step is to convert the amount of water added and magnesium sulfate hydrate used. Calculating the number of moles of water added is easy:

$$90\ \mathrm{g}\ \text{water added} \times \frac{1\ \mathrm{mol}\ \ce{H2O}}{18\ \mathrm{g} \ \ce{H2O}} = 5\ \mathrm{mol}\ \ce{H2O}$$

The number of moles of $\ce{MgSO4.$x\,$H2O}$ is unknown because even though you know how much mass was dissolved, you don’t know its formula completely. However, $\ce{MgSO4}$ contributes $120\ \mathrm{g\ mol^{-1}}$ to the molar mass, and each additional molecule of water in the hydrate stoichiometry adds a further $18\ \mathrm{g\ mol^{-1}}$, so that the molar mass of $\ce{MgSO4.$x\,$H2O}$ is $120\ \mathrm{g\ mol^{-1}} + x \times 18\ \mathrm{g\ mol^{-1}} = (120+18x)\ \mathrm{g\ mol^{-1}}$. With this molar mass, the number of moles of $\ce{MgSO4.$x\,$H2O}$ is:

$$70\ \mathrm{g}\ \ce{MgSO4.$x\,$H2O} \times \frac{1\ \mathrm{mol}\ \ce{MgSO4.$x\,$H2O}}{(120+18x)\ \mathrm{g}\ \ce{MgSO4.$x\,$H2O}} = \frac{70}{120+18x}\ \mathrm{mol}\ \ce{MgSO4.$x\,$H2O}$$

From the definition of mole fraction:

$$X_\text{solute}=\frac{n_\text{solute}}{n_\text{total}}=\frac{n_\text{solute}}{n_\text{solute}+n_\text{solvent}}$$

Now, one is tempted to write the following and solve for $x$:

$$X_\text{solute}=\frac{n_\text{solute}}{n_\text{solute}+n_\text{solvent}}=\frac{\frac{70}{120+18x}\ }{\frac{70}{120+18x}+5 \ }=0.039$$

However, this equation is incorrect. The problem is that the following process was not taken into account:

$$\ce{MgSO4.$x\,$H2O(s) \xrightarrow{water} MgSO4(aq) + $x$\ H2O(l)}$$

In other words, when the magnesium sulfate hydrate dissolves in water, the water molecules contained in the solid are released and become an indistinguishable part of the solvent; the final mixture is a simply a solution of the solute $\ce{MgSO4}$ in water. Therefore, the number of moles of solvent is not simply $5\ \mathrm{mol}$ as calculated at the start, but rather a larger value, which should include the number of moles of water released when the solid dissolves.

From the dissolution equation, we see that $1\ \mathrm{mol}$ of $\ce{MgSO4.$x\,$H2O}$ generates $1\ \mathrm{mol}$ of $\ce{MgSO4}$ and $x\ \mathrm{mol}$ of $\ce{H2O}$ from crystallized water. However, we know the amount of moles of $\ce{MgSO4.$x\,$H2O}$. This means the following:

$$n_\text{solute}=n_{\ce{MgSO4}}=1 \times n_{\ce{MgSO4.$x\,$H2O}}= \frac{70}{120+18x}\ \mathrm{mol}\ \ce{MgSO4}$$

$$n_\text{solvent} = n_\text{added water} + n_\text{crystallized water} = n_\text{added water} + x \times n_{\ce{MgSO4.$x\,$H2O}} = \bigg(5 + \frac{70x}{120+18x}\bigg)\ \mathrm{mol}\ \ce{H2O}$$

Now we can finally apply these values to the mole fraction equation:

$$X_\text{solute}=\frac{n_\text{solute}}{n_\text{solute}+n_\text{solvent}}=\frac{\frac{70}{120+18x}}{\frac{70}{120+18x} + \bigg(5 + \frac{70x}{120+18x}\bigg)}=0.039$$

Solving for $x$ provides the answer $x=7.03$, which means there are seven moles of water per mole of $\ce{MgSO4}$, and thus the formula for the solid is $\ce{MgSO4.7H2O}$, representing magnesium sulfate heptahydrate.