So first, I would assume they all are nickels, to see how short of $3.50 we are.
So, 45 coins times the value of 5 cents would then be $2.25.
So that means we are 1.25 dollars short of 3.50 dollars.
If the dime is worth 5 cents more then the nickel is, we can just divide 1.25 by 5 cents to see how many extra 5 cents we need.
1.25/0.05 = 25
So therefore there were 25 dimes, and through that we can tell there were 20 nickels.