Let E be the event of getting a red ball. Then,
P(getting a white ball) + P(getting a black ball) + P(E ) = 1
` rArr 3/10+2/5 + P(E ) = 1 rArr 7/10 + P(E ) = 1`
` rArr P(E ) = 1 -7/10 = 3/10`
` rArr ` P(getting a red ball ) = `3/10`.
Since P(getting a white ball) = P (getting a red ball), so the number of white balls is equal to the number of red balls, say x.
`:. ` P(geting a red ball) = `x/(x+20+x) = x/(2x+20)`.
` :. x/(2x+20) = 3/10 rArr 10x = 6x + 60 rArr 4x = 60 rArr x = 15`.
Hence, the total number of balls in the bag
` = 2x + 20 = 2 xx 15 + 20 = 50`.