Let the number of nickels be n, then the number of quarters is 84-n.
The value of 1 qtr is 25c and the value of 1 nickel is 5c.
The total value is 5n+25(84-n)=1240 (in cents).
5n+2100-25n=1240, 20n=860, n=860/20=43.
So there are 43 nickels (worth $2.15) and 41 quarters (worth $10.25).