Let

be the number of quarters you have, and

be the number of dimes you have. With the information provided above, you have the following equation:

Next, you know the value of a quarter is 0.25, and the value of a dime is 0.10, so you can set up the next equation:

Substituting the first equation into the second leads to the following:

Solving for

will give you the number of dimes you have, and then you can easily figure out how many quarters you have as well.