Applying the complement rule to find the number of solutions to $x_1 + x_2 + x_3 + x_4 + x_5 = 21$ with restrictions My Rosen's Discrete Mathematics textbook presents the following problem:
How many solutions are there to the equation $x_1 + x_2 + x_3 + x_4 + x_5 = 21$,
where $x_i , i = 1, 2, 3, 4, 5$, is a nonnegative integer such
that:

$0 ≤ x_1 ≤ 3$
$1 ≤ x_2 < 4$
and
$x_3 ≥ 15$

I literally had no clue how to approach this problem, and I find it very intimidating. I don't even know where to start, honestly. I looked up the solution in the corresponding manual, but that's even more perplexing:



Could someone please help me try to make sense of this in the least complicated terms possible? How do I determine where to start and avoid making mistakes? I know this is treated like a combination problem with multisets, so the formula will involve the binomial coefficient with the top term as $n + m - 1$ and the bottom as $m - 1$, where $n$ is the number of things being picked (in this case, $21$) and $m$ is the number of variations/categories ($5$). Beyond that, I'm stumped.
 A: Putting it in concrete terms,
balls in bins, rather than algebraical manipulation may give you a clearer grasp.


*

*To start with, put $15$ balls in bin #3, and $1$ ball in bin #2. Now only $5$ balls are to be put.

*We can violate the remaining constraints only by pre-placing $4$ balls in bin #1$\; XOR\;$ $3$ balls in bin #2, and we need to subtract such arrangements.

*Putting the pieces together, ans $= \binom 9 4 - \binom 5 4 - \binom 6 4 = 106$
A: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$

$\ds{0 \leq x_{1} \leq 3\,,\quad 1 \leq x_{2} < 4\,,\quad x_{3} \geq 15}$.

The answer is, $\ds{\underline{\mathsf{by\ definition}}}$, given by
\begin{align}
&\sum_{x_{1} = 0}^{3}\sum_{x_{2} = 1}^{3}\sum_{x_{3} = 15}^{\infty}
\sum_{x_{4} = 0}^{\infty}\sum_{x_{5} = 0}^{\infty}
\bracks{z^{21}}z^{x_{1} + x_{2} + x_{3} + x_{4} + x_{5}} =
\bracks{z^{21}}\sum_{x_{1} = 0}^{3}\sum_{x_{2} = 0}^{2}\sum_{x_{3} = 0}^{\infty}
\sum_{x_{4} = 0}^{\infty}\sum_{x_{5} = 0}^{\infty}
z^{x_{1} + \pars{x_{2}  + 1} + \pars{x_{3} + 15} + x_{4} + x_{5}}
\\[5mm] = &
\bracks{z^{5}}\sum_{x_{1} = 0}^{3}\sum_{x_{2} = 0}^{2}\sum_{x_{3} = 0}^{\infty}
\sum_{x_{4} = 0}^{\infty}\sum_{x_{5} = 0}^{\infty}
z^{x_{1} + x_{2} + x_{3} + x_{4} + x_{5}} =
\bracks{z^{5}}\pars{\sum_{x_{1} = 0}^{3}z^{x_{1}}}
\pars{\sum_{x_{2} = 0}^{2}z^{x_{2}}}
\pars{\sum_{x = 0}^{\infty}z^{x}}^{3}
\\[5mm] = &\
\bracks{z^{5}}{z^{4} - 1 \over z - 1}\,{z^{3} - 1 \over z - 1}
\pars{1 \over 1 - z}^{3} =
\bracks{z^{5}}{z^{7} - z^{4} - z^{3} + 1 \over \pars{1 - z}^{5}} =
\\[5mm] = &\
 -\bracks{z^{1}}\pars{1 - z}^{-5} - \bracks{z^{2}}\pars{1 - z}^{-5}  + \bracks{z^{5}}\pars{1 - z}^{-5}
\\[5mm] = &\
-{-5 \choose 1}\pars{-1}^{1} - {-5 \choose 2}\pars{-1}^{2} +
{-5 \choose 5}\pars{-1}^{5}
\\[5mm] = &\
-{5 \choose 1} - {6 \choose 2} + {9 \choose 5} =
-5 - 15  + 126 = \bbx{106}
\end{align}
