Let’s take W1 and W2 to be two bags containing (4W, 5B) and (9W, 7B) balls respectively.
Let E1 be the event that the transferred ball from the bag W1 to W2 is white and E2 the event that the transferred ball is black.
And, E be the event that the ball drawn from the second bag is white.
So, the probabilities are:
P(E/E1) = 10/17, P(E/E2) = 9/17
P(E1) = 4/9 and P(E2) = 5/9
Now, P(E) = P(E1).P(E/E1) + P(E2).P(E/E2)
= 4/9 x 10/17 + 5/9 x 9/17 = 40/153 + 45/153 = 85/153 = 5/9
Therefore, the required probability is 5/9.