Answer:
1 small bags and 5 large bags
Explanation:
In this case we can solve it using a 2x2 system of equations, like this:
let x: number of small bag
let y: number of large bag
So:
5 * x + 8 * y = 45
x + y = 6 => x = 6 - y
Replacing, we are left with that:
5 * ( 6 - y) + 8 * y = 45
30 - 5 * y + 8 * y = 45
- 5 * y + 8 * y = 45 - 30
3 * y = 15
y = 15/3
y = 5
Now to calculate x:
x = 6 - 5
x = 1
this means that 1 small bag and 5 large bags