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 CuSO4 there is 5 moles of H2O, and for every moles of MgSO4 there is 7 moles of H2O.
Therefore:
5 * Moles of CuSO4 + 7 * Moles of MgSO4 = Moles of H2O
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 H2O
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 CuSO4 and 2.988 – X is grams of MgSO4).
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 CuSO4 . 5H2O, 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.