I just need to know the formula to solve this problem. I will solve it myself.

Problem:
A woman has $1.70 in dimes and nickels. She has 5 more dimes than nickels. How many nickels does she have?

let the number of nickels be n

then the number of dimes is n+5

then isn't
5n + 10(n+5) = 170 ??