Final answer:
The bag contains 14 red marbles and 33 green marbles.
Step-by-step explanation:
Let x be the number of red marbles in the bag. According to the question, the number of green marbles is 5 more than 2 times the number of red marbles, so it can be expressed as 2x + 5.
The total number of marbles in the bag is 47, so we can set up the equation x + (2x + 5) = 47. Simplifying this equation, we get 3x + 5 = 47. Subtracting 5 from both sides, we have 3x = 42 and dividing both sides by 3, we find x = 14.
Therefore, there are 14 red marbles in the bag. To find the number of green marbles, we substitute x = 14 into the expression 2x + 5, giving us 2(14) + 5 = 33 green marbles.