If they set aside the 8 extra quarters, the remaining coins will be pairs consisting of one quarter and one dime--each pair worth $0.35. The value of those pairs is $5.15 -2.00 = $3.15, so there must be $3.15/$0.35 = 9 of them.
There are 9 dimes and 17 quarters.