Vijay bought 7 bags of apples. The red apples came in bags of 5 and the green apples came in bags of 9. Vijay bought a total of 51 apples. How many bags of each type of apple did he buy?
For this problem, you can guess and check.
If we have 7 bags of 9 apples, it totals 63 apples.
If we have 7 bags of 5 apples, it toals 35 apples.
Each time we replace a bag of 9 apples with 5, it deducts 4 apples from the total.
63-51=12 apple difference from 7 bags of 9 apples from the actual number of apples
12/4=3 bags of red apples
7-3=4 bags of green apples
Therefore, there are 4 bags of green apples and 3 bags of red apples.
(doing it backwards to prove that it's correct)