Let’s assume that there are ‘x’ number of balls in the container.
We know that the sum of all the elementary events is equal to one.
Here, the selection of white, yellow or red balls from the container are elementary events. So, P(White) + P(Yellow) + P(Red) = 1
P(White) + P(Yellow) + P(Red) = 1
(1/7) + (1/5) + P(Red) = 1
P(Red) = 1 - (1/7) - (1/5) = 23/35 … (i)
In the question, it is given that there are 23 Red balls in the container.
So, P(Red) = 23/x …. (ii)
eq (i) and (ii) are equal
Therefore, P(Red) = 23/35 = 23/x
So, x = 35
Total number of balls in the container is 35 balls.