John has $1.25 in dimes and quarters. There are 8 coins altogether. How many coins of each

time does he has of each type?

d + q = 8 ... d = 8 - q

10 d + 25 q = 125

substituting ... 10 (8 - q) + 25 q = 125 ... 80 - 10 q + 25 q = 125
... 15 q = 45

solve for q , then substitute back to find d