Let D be the CDs and C for the cassetes. We can write the first statement as

and the second statement as

Then, we must solve these equations.
Solving by elimination method.
We can multiply by -2 the second equation. Then, we have the following system of equations:

We can see that if we add both equations, we obtain

because 2D-2D=0. Then, we have

If we move the coefficient -7 of C to the right hand side, we have

Now, we can substitute this value into the first equation in order to find D. It yields,

Then, the answer is C=11 and D=21. So, the cost for the CDS is $21 and for the cassettes is $11.