First, it would be wise to check the given probabilities for n=2 and 3. I'm assuming that the balls are identical, that is, indistinguishable from one another. Outcomes are different if each ball is unique (for example, different colours). Probability is the ratio of the number of specific occurrences to the number of possible outcomes.
For n=2, if the boxes are labelled A and B then the contents will be in order, AB=
11, 02, 20 (permutation) or 11, 02 (combination) so only if we take the combination do we have a probability of ½. Now consider n=3.
If we label the boxes A, B, C, then write the numbers of balls in the box as ABC in that order, ABC=
111, 012, 021, 102, 120, 201, 210, 003, 030, 300 is all the possible outcomes (10 in all=n2+1). Of these, 6 have just one empty box, so the probability is 6/10=⅗, not ⅔, as stated. But if we examine combinations instead of permutations, then we get 111, 012, 003 and the probability becomes ⅓, not ⅔. So it's not clear what the given probability refers to when n=3. A probability of ⅔ would be that at least one box is empty, rather than exactly one.
However, the method I'm illustrating here may help you to solve the problem yourself (or make it more confusing!).
Consider n=4, the case of 4 balls and 4 boxes, A, B, C, D. If we start with 1 ball in each box, to empty just one box, that ball must be placed in another box so we have the sum 0+1+1+2.
We have the combinations:
each box contains one ball;
one box is empty, two boxes each contain one ball and one box contains two balls;
two boxes are empty, one box contains one ball, one box contains 3 balls;
two boxes are empty, two boxes each contain 2 balls;
three boxes are empty, one box contains all 4 balls.
Now for outcomes involving permutations (for example, there are 4 permutations in which there are 3 empty boxes and one box containing all the balls).
We need to find out how many permutations of the digits 0, 1, 1, 2 we can have. 2 digits are the same and since there are 4!=24 ways of arranging 4 different digits and 2!=2 ways of arranging 2 different digits, the number of ways of arranging 0, 1, 1, 2=4!/2!=12: 0112, 0121, 0211, 1012, 1021, 1102, 1120, 1201, 1210, 2011, 2101, 2110.
Now have to find the number of all possible outcomes. There's only one way to put 4 balls into 4 boxes with no empty boxes: one in each box; 12 ways to end up with one empty box. For two empty boxes we need two digits summing to 4, that is, 2+2 and 3+1. So we have permutations of 0, 0, 2, 2 (4!/(2!)2=6) and 0, 0, 1, 3 (4!/2!=12) total 18. For three empty boxes we want one digit, which of course is 4 and there are 4 ways to arrange 3 zeroes and a four. Total: 1+12+18+4=35. So the probability when n=4 is 12/35.
For n balls and boxes, we start with 1 ball in each box then move 1 ball into another box leaving a box empty. Therefore we have 0 balls in 1 box, 2 balls in another box and the remaining n-2 boxes contain 1 ball, giving us the permutation n!/(n-2)!=n(n-1)(n-2)!/(n-2)!=n(n-1).
Now we have to find a formula for all possible outcomes. We can start with 1 ball in each box, We also know that there are n outcomes when all the balls are in one box, and, of course, n(n-1) when there's just one empty box. The total so far is 1+n+n(n-1)=n2+1.
Because the probability I calculated for n=3 does not match the given one, my interpretation of the question seems to be wrong, or the given probability for n=3 is wrong. Please clarify your question.
More to follow in due course...