How many ways can 25 red balls be put into 3 distinguishble boxes if no box is to contain more than 15 balls? I'm reading Martin's: Counting: The Art of Enumerative Combinatorics.

How many ways can 25 red balls be put into 3 distinguishble boxes if no box is to contain more than 15 balls?

I understand that it's the solutions to the equation $x+y+z=2$5 minus the solutions to the equation $x+y+z=25-16$. The answer in the book is:
$${3+25-1\choose 25}-{3 \choose 1}{3+9-1 \choose 9}$$


*

*I understand why ${3+25-1\choose 25}$ and ${3+9-1 \choose 9} $ are there, but I don't understand why ${3 \choose 1}$ is there.

*I don't understand why $x+y+z=25-16$ and not $x+y+z=25-15$.


I understand that it's the solutions to the equation $x+y+z=25$ minus the solutions to the equation $x+y+z=25−16.$

Not exactly.
How do we find the number of solutions of $x+y+z = 25$ for $x,y,z\in\mathbb{Z}$, $x,y,z\geq 0$ such that at least one of $x,y,z$ is greater that 15? At most one of these variables can be greater that 15 at the same time, and since it is integer and greater that 15, then it is at least 16. So let's deduct 16 from this variable, and then we get a solution for $x+y+z = 25-16$. But any given solution for $x+y+z = 25-16$ can be obtained in this way from three different "wrong" solutions for $x+y+z = 25$: you can get those "wrong" solutions from the solution for $x+y+z = 25-16$ by adding 16 to $x, y$ or $z$. (For example, you can obtain $(0,6,3)$ from $(16,6,3)$, $(0,22,3)$ or $(0,6,19))$.
So the answer to the problem is the number of solutions for $x+y+z = 25$ minus three times the number of solutions for $x+y+z = 25-16$.
And you need to deduct 16, not 15, from a variable in a "wrong" solution to count them, because if you have a solution for $x+y+z = 25-15$, where $x,y,z\in\mathbb{Z}$, $x,y,z\geq 0$, and you add 15 to one of the variables, then you can get a solution for $x+y+z = 25$ such that all variables are not greater than 15. For example, from $(0,6,4) $you can get $(15,6,4).$
