I cant really explain mathematically I just used simple math basically but 4 quarters is $1 4×3.5=14. 14 quarters is $3.50 which means you have $1.80 left 10 dimes are in $1 10×18=180 -> $1.80 so to make $5.30 with 32 coins of dimes and quarter you would need 14 quarters and 18 dimes