1️⃣ Assume all 45 coins are 50-cent coins: 45 × $0.50 = $22.50
2️⃣ But the actual amount is only $17.10. So the excess is: $22.50 − $17.10 = $5.40
3️⃣ The difference between a 50-cent coin and a 20-cent coin is: $0.50 − $0.20 = $0.30
4️⃣ Every 50-cent coin we replace with a 20-cent coin reduces the total by $0.30. To reduce $5.40, we need: $5.40 ÷ $0.30 = 18 coins
So 18 of the coins are 20-cent coins, and the remaining: 45 − 18 = 27 coins are 50-cent coins