Solution :-
Let the total number of red balls initially be x
Total number of balls in the box = 12
P(getting a red ball) = x/12
Now, 6 red balls are put in the box, then the total number of balls
= 12 + 6
= 18 balls
Then total number of red balls = (x + 6)
Now,
P(getting a red ball) = (x + 6)/18
According to the question.
2(x/12) = (x + 6)/18
2x/12 = (x + 6)/18
Cross multiplying
⇒ 36x = 12x + 72
⇒ 36x - 12x = 72
⇒ 24x = 72
x = 3
So, initially the number of red balls in the box were 3