d = number of dimes
n = number of nickels
The jar contains a total of 107 coins, so
d + n = 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.10d + 0.05n = 6.70
Multiply both sides of the second equation by 100 to eliminate the decimal points:
10d + 5n = 670
Multiply both sides of the first equation by -5:
-5d - 5n = -535
Add the corresponding sides of these two equations to eliminate n and solve for d :
(10d + 5n) + (-5d - 5n) = 670 + (-535)
(10 - 5)d + (5 - 5)n = 670 - 535
5d = 135
d = 135/5 = 27
Then
n = 107 - d = 80
so the jar contains 27 dimes and 80 nickels.