1 dime = 10 cents
1 quarter = 25 cents
$4.90 = 490 cents
let q = quaters
let d = dimes
d + q = 40 ----- equation 1
10d + 25q = 490 ----- equation 2
10d+ 10q = 400 ---- equation 1 multiplied by 10
10d + 25q = 490 ---- equation 2 multiplied by 1
-15q = -90
q = 90/15
q = 6
plug q into any one of the equations
d + q = 40
d + 6 = 40
d = 40 - 6
d = 34
34 dimes and 6 quaters