Answer: Let's use the variable "r" to represent the number of red marbles in the bag, and "g" to represent the number of green marbles.
According to the problem, the ratio of red to green marbles is 2:3. This means that we can write:
r/g = 2/3
Multiplying both sides by 3g, we get:
3r = 2g
We also know that if two red marbles are taken away, the ratio becomes 1:2. This means that we can write:
(r-2)/g = 1/2
Multiplying both sides by 2g, we get:
2(r-2) = g
Now we can use the fact that 3r = 2g (which we derived earlier) to substitute for g:
2(r-2) = 3r/2
Multiplying both sides by 2, we get:
4(r-2) = 3r
Expanding the brackets, we get:
4r - 8 = 3r
Subtracting 3r from both sides, we get:
r = 8
Therefore, there are 8 red marbles in the bag.
Explanation: