Case 1: When a white ball is transferred from the bag A to bag B
\(P_1=\frac{5}{5+4}=\frac{5}{9}\)
Now, bag B contains 8 white and 6 black balls. Then, the probability of drawing a black ball from bag B is P2 = 6/14
∴ The probability of both the events occuring together
\(=P_1P_2=\frac{5}{9}\times\frac{6}{14}=\frac{30}{126}=\frac{5}{21}\)
Case 2: When a black ball is transferred from the bag A to bag B
\(P_3=\frac{4}{5+4}=\frac{4}{9}\)
Now, bag B contains 7 white and 7 black balls. Then, the probability of drawing a black ball from bag B is P4 = 7/14
∴ The probability of both the events occuring together
\(=P_3P_4=\frac{4}{9}\times\frac{7}{14}=\frac{2}{9}\)
∴ The required probability
\(=P_1P_2+P_3P_4=\frac{5}{21}+\frac{2}{9}=\frac{15+14}{63}=\frac{29}{63}\)