First, let's assign variables for the moles of CuSO₄·5H₂O as x and moles of MgSO₄·7H₂O as y. The molar mass of the substances are the following
CuSO₄·5H₂O: 249.685 g/mol
CuSO₄: 159.609 g/mol
MgSO₄·7H₂O: 246.49 g/mol
MgSO₄: 120.366 g/mol
H₂O: 18 g/mol
The solution is as follows:
2.988 = 249.685x + 246.49y --> eqn 1
5.02 - 2.988 = 18(5x + 7y) --> eqn 2
Solving both equations simultaneously, the values of x and y are:
x = 0.0134 mol CuSO₄·5H₂O
y = 0.0257 mol MgSO₄·7H₂O
Thus, the percent CuSO₄·5H₂O is equal to
Mass Percentage = [(0.0134 mol CuSO₄·5H₂O)*(249.685 g/mol )]/{[(0.0134 mol CuSO₄·5H₂O)*(249.685 g/mol )] + [(0.0257 mol MgSO₄·7H₂O)*(246.49 g/mol)]} * 100
Mass percentage = 34.56%