Here's a similar example. See if you can follow the reasoning.
My piggy bank contains 21 coins; some are dimes, and the rest are 50-cent pieces.
My piggy bank contains $8.50.
How many dimes and how many 50-cent pieces are there in my piggy bank?
x = the number of dimes
Since there's 21 coins total, the number of 50-cent pieces must be the difference.
21 - x = the number of 50-cent pieces.
Each dime is worth $0.10 and each 50-cent piece is worth $0.50.
So, the total worth of the dimes is 0.1x and the total worth of the 50-cent pieces is (0.5)(21 - x).
0.1x + (0.5)(21 - x) = 8.5
Solve the equation.
0.1x + 10.5 - 0.5x = 8.50
0.1x - 0.5x = 8.5 - 10.5
-0.4x = -2
x = 5
21 - 5 = 16
There are 5 dimes and 16 half dollars.
Use the same strategy to solve your exercise.
If you need more help, then please show your work, and try to say something about why you're stuck.
MY EDIT: minor change in wording