Let number of 5-cent coins be F
Then number of 20-cent coins is: 31 - F
We then get the following VALUE equation: .05F + .2(31 - F) = 3.5
Solve this for F, the number of 5-cent coins.
Subtract value of F from 31 to get number of 20-cent coins.
Note that the value of F MUST be an integer.
It's as simple as that...nothing COMPLEX!!