Let's assume that there are x quarters and y dimes in the collection of coins.
Since we know the total number of coins is 34, we can set up the equation:
x + y = 34
We also know that the total value of the coins is $4. We can convert the number of quarters to dollars by multiplying by 0.25, and convert the number of dimes to dollars by multiplying by 0.10. Then we can set up another equation:
0.25x + 0.10y = 4
Now we have two equations with two variables. We can solve for x and y by using substitution or elimination.
Using substitution:
x + y = 34 --> y = 34 - x
0.25x + 0.10y = 4
0.25x + 0.10(34 - x) = 4
0.25x + 3.4 - 0.10x = 4
0.15x = 0.6
x = 4
y = 34 - x = 30
Therefore, there are 4 quarters and 30 dimes in the collection of coins.