Let n, d, q represent the numbers of nickels, dimes, quarters, respectively.
.. 5n +10d +25q = 510 . . . . . . . total value in cents
.. n - d = 0 . . . . . . . . . . . . . . . . . the number of nickels and dimes is the same
.. 5n + 10d - 25q = -240 . . . . . the value of quarters is 2.40 more than that of nickels and dimes.
You can find the number of nickels by adding the first equation, 20 times the second equation, and the third equation together.
.. (5n +10d +25q) +20(n -d) +(5n +10d -25q) = (510) +20*(0) +(-240)
.. 30n = 270
.. n = 9
.. d = 9
Donnie has 9 dimes.
_____
The number of dimes and nickels is the same, so we can consider them together as making a group worth 15¢. Then we are told
.. (value of nickels/dimes) + ((value of nickels/dimes) + $2.40) = $5.10
where ((value of nickels/dimes) + $2.40) = (value of quarters)
Then
.. 2*(value of nickels/dimes) = 5.10 -2.40 = 2.70 = 2*(9*0.15)
There are 9 groups of nickel+dime, hence 9 dimes.