The minimum number of iteration will be 2 if we pick white balls from bag A and black balls from bag b.
The maximum number of iteration will be infinity if we pick a black ball from bag A and white ball from bag B except the first iteration.
But, in random choice, we might have to calculate the probability of choosing a white ball from bag A after the first iteration.
That's my first shot for this problem. if anyone can have a good idea to solve this problem. I will be happy to hear that.