Group coins in sets containing {2 dimes and 1 quarters} in each set.
The condition directly says that it is possible to do.
Then each set worth is 2*10+25 = 45 cents.
How many sets are there? = 14.
Hence, there are 14 quarters and 2*14 = 28 dimes.
Answer. There are 14 quarters and 28 dimes.