Let the number of dimes be: d
Then, since the number of quarters is two less than the number of dimes: q = d - 2
The number of nickels is twice the number of quarters: n = 2·q = 2(d - 2) = 2d - 4
Since there are 40 coins, p + n + d + q = 40
or: p + (2d - 4) + d + (d - 2) = 40
Solving for p: p + 4d - 6 = 40 ---> p = 46 - 4d
.01(46 - 4d) + .05(2d - 4) + .10(d) + .25(d - 2) = 3.86
Multiply by 100:
(46 - 4d) + (10d - 20) + (10d) + (25d - 50) = 386
41d - 24 = 386
41d = 410
---> d = 10
Use this to find the other answers and check the work.