<em>d</em> = number of dimes
<em>n</em> = number of nickels
The jar contains a total of 107 coins, so
<em>d</em> + <em>n</em> = 107
Each dime is worth $0.10 and each nickel is worth $0.05, and the jar contains a total value of $6.70, so
0.10<em>d</em> + 0.05<em>n</em> = 6.70
Multiply both sides of the second equation by 100 to eliminate the decimal points:
10<em>d</em> + 5<em>n</em> = 670
Multiply both sides of the first equation by -5:
-5<em>d</em> - 5<em>n</em> = -535
Add the corresponding sides of these two equations to eliminate <em>n</em> and solve for <em>d</em> :
(10<em>d</em> + 5<em>n</em>) + (-5<em>d</em> - 5<em>n</em>) = 670 + (-535)
(10 - 5)<em>d</em> + (5 - 5)<em>n</em> = 670 - 535
5<em>d</em> = 135
<em>d</em> = 135/5 = 27
Then
<em>n</em> = 107 - <em>d</em> = 80
so the jar contains 27 dimes and 80 nickels.