Given,the probability of getting a white ball
⇒ P(W)=310
and the probability of getting a black ball
⇒ P(B)=25
then,the probability of getting a red ball
⇒ P(R)=1−310−25=10−3−410=310
Now, 25 of total number of balls=20
Total number of balls=20×52
=50
Hence,the total no.of balls in the bag is 50.