Solution:
Number of red balls = 6
Let number of blue balls be x.
Total number of balls = 6+x
Probability of drawing a red ball = 6/(6+x)
Probability of drawing a blue ball = x/(6+x)
Given the probability of drawing a blue ball is twice that of a red ball.
x/(6+x) = 2× 6/(6+x)
x = 12.
So total number of balls = x+6 = 12+6 = 18.
Hence the total number of balls in the bag is 18.