Solution:Let the number of blue balls in bag A be 2t
Then, number of red balls in bag A = (3/2) × 2t = 3t
Given, total number of balls in bag A = 40
According to the question:
⇒ 2t + 3t = 40
⇒ 5t = 40
⇒ t = (40/5) = 8
Hence, number of red balls in bag A = 3t = (3 × 8) = 24
Number of blue balls in bag A = 2t = (2 × 8) = 16
Given, ratio between the total number of balls in bag A and the total number of balls in bag C = 4 : 5
Total number of balls in bag C = (5/4) × 40 = 50
Let the number of red balls in bag C be ‘y’
Then, number of blue balls in bag C = (50 - y)
Given, average number of red balls in bags A and C together = 21
According to the question:
⇒ (24 + y)/2 = 21
⇒ 24 + y = 42
⇒ y = (42 - 24) = 18
Number of red balls in bag C = y = 18
Hence, number of blue balls in bag C = (50 - y) = (50 - 18) = 32
Average number of blue balls in bags A and C together = (16 + 32)/2 = 24
Hence, number of blue balls in bag B = (24 + 4) = 28
Bag | Red balls | Blue balls
A → 24 | 16
B → 20 | 28
C → 18 | 32
Required total number of balls in bag B = (20 + 28) = 48