i need help working this out

I think in this situation the best method would be a guess and check. You know that there are 8 dimes more than there are nickels. So just keep increasing each number by one until you reach $1.40. If there were 9 dimes and 1 nickels it would add up to $0.95. If there were 10 dimes and 2 nickels, it would add up to $1.10. If there were 11 dimes and 3 nickels, it would add up to $1.25. If there were 12 dimes and 4 nickels, it would add up to $1.40. So your answer is 12 dimes and 4 nickels.
I hope this helped!
d = n + 8
10d + 5n = 140
Solve this equations: d = 12 ∧ n = 4
A tool like photomath can solve this step by step for you.
12 Dimes and 4 Nickels.