Final answer:
To solve this problem, let's set up a system of equations. By solving the system, we can find the number of CDs and DVDs the student bought.
Step-by-step explanation:
To solve this problem, let's assign variables to the number of CDs and DVDs bought. Let's say the number of CDs is x and the number of DVDs is y. Using the given information, we can set up a system of equations:
x + y = 7 (total number of items)
9x + 17y = 87 (total cost)
From the first equation, we can solve for x in terms of y: x = 7 - y.
Substituting x into the second equation, we get: 9(7 - y) + 17y = 87.
Simplifying the equation, we have: 63 - 9y + 17y = 87.
Combining like terms, we get: 8y = 24.
Dividing both sides by 8, we find that y = 3. Substituting y back into the first equation, we find x = 4.
Therefore, the student bought 4 CDs and 3 DVDs.