This is a problem in my combinatorics book that uses the principle of inclusion-exclusion. I can follow almost all of what is said, except the book says that if we consider $A_{i}$ to be the set of solutions where box i is empty, then $|A_{i}| = {n-(k-1)-1 \choose k-1}$.
The book does not explain why this is true. And I want to know why, since I thought that $|A_{i}| = {n+(k-1)-1 \choose k-1}$.
So that you can get to the root of my misunderstanding, my reasoning was that a placement of n identical balls into k distinct boxes is the same as the number of nonnegative integer solutions to $x_{1}+\cdots+x_{k} = n$.
Any help would be much appreciated!
To begin with, I'd solve the problem differently: By a stars-and-bars, there are $n-1\choose k-1 $ ways to place $n$ balls into $k$ bins such that no bin is empty. Subtract this from the $n+k-1\choose k-1$ ways to place $n$ balls into $k$ bins without restriction.