Let x = dimes , ( 25 - x ) = nickels
Number of dimes * value each + Number of nickels * value each = Total Value
So.....
x * 10 + (25 - x) * 5 = 165 simplify
10x + 125 - 5x = 165
5x + 125 = 165 subtract 125 from both sides
5x = 40 divide both sides by 5
x = 8 dimes