Solving Systems by Substitution

Maribel has $1.25 in her pocket. The money is in quarters and dimes. There are a total of 8 coins. How many quarters and dimes does Maribel have in her pocket?
I think the equation is 10x+25x=$1.25 and x+x=8 but I'm not sure.

1 answer

Q+D=8
25Q+ 10D=125
Q+ D=8
multiply the second equation by 10
25Q+ 10D=125
10Q+ 10D=80
subtract the second equation from the first.
15Q=45
Q=3
then D=5