This is not to you, but good lord why do I keep answering the same question over and over in a slightly different form?!

A percent is per 100, when you have a percent divided into two separate things they must add up to 100.

One of the salts of you choice becomes X g, the other becomes 2.988-X g

Now, you know how much water was lost, and so how many moles of water was lost.

For every moles of CuSO_{4} there is 5 moles of H_{2}O, and for every moles of MgSO_{4} there is 7 moles of H_{2}O.

Therefore:

5 * Moles of CuSO_{4} + 7 * Moles of MgSO_{4} = Moles of H_{2}O

This is where your grams come in, and the molar mass of the anhydrous salts.

So it simplifies down to:

5 * (Xg / 159.6096 mol) + 7 * (2.988-Xg / 120.3686 mol) = Moles of H_{2}O

Solve for X and you know have your grams of anhydrous salt for both (X in how I have it written out is grams of CuSO_{4} and 2.988 – X is grams of MgSO_{4}).

Once you have the grams (and thus moles) of your salts you can simply add the appropriate amount of water (5 moles to 1 moles ) This will give you your original weight of CuSO_{4} **.** 5H_{2}O, and then it is just division for percentage.

That sounds like a lot, but I am trying to type up the steps so you can do it yourself and learn, it is really quite simples.