This problem is asking for the total number of balls in the bag.
The very first thing the problem gives us is the probability for pulling each color of ball out of the bag.
p(Green) = 1/3
p(Blue) = 1/2
And by inference we can find red
p(Red) = 1 - 1/3 - 1/2 = 1/6
From these probabilities and assuming that the balls identical in every single way besides color, we can assume that 1/3 of the balls are green, 1/2 of them are blue, and 1/6 or them are red. In other words, we are assuming that the probability of drawing a certain color of ball is equal to the proportion of that color to the total number of balls.
Therefore, when the problem says that the number of red balls is 6, we automatically know that 6 is equal to 1/6 of the total number of balls: 6 = Total number of balls * (1/6)
To solve the equation, we can either divide both sides by 6 or multiply by the reciprocal of (1/6). Either way,
the left side becomes 6 * 6 = 6 / (1/6) = 36 and the right side becomes Total number of balls * (1/6) * 6 = Total number of balls * (1/6) / (1/6) = Total number of balls
Total number of balls = 36