Hello alakazamThe number of ways of selecting the n balls to go in the first basket is .

The number of ways of selecting white balls from , and black balls from to go in the first basket is .

So the probability that there are initially white balls in the first basket is

At the commencement of the second stage, there are white and black balls in the first basket, and white and black in the second. Then there are three possibilities:

, where a black ball is removed from the first basket, and a white from the second. The probability of this is

, where either a black is removed from the first and a white from the second, or the other way round. The probability of this is

, where a white is removed from the first and a black from the second. The probability of this is

The overall probabilities therefore are:

Grandad