Let the number of nickels be n and the number of dimes be d.

Then

n + d = 50

0.05*n + 0.10*d = 4.15

Solving the top equation for d:

d = 50 - n

Insert this into the bottom equation:

0.05*n + 0.10*[50 - n] = 4.15

0.05*n + 5.00 - 0.10*n = 4.15

-0.05*n = 4.15 - 5.00 = -0.85

n = (-0.85)/(-0.05) = 17

Thus d = 50 - 17 = 33

-Dan