Solving the equation $x_1 + x_2 + x_3 = 8$ involves determining how many ways two plus signs can be placed in a list of eight 1's. For instance, the list
$$1 1 1 + + 1 1 1 1 1$$
corresponds to the solution $x_1 = 3, x_2 = 0, x_3 = 5$, while
$$1 + 1 1 1 1 + 1 1 1$$
corresponds to the solution $x_1 = 1, x_2 = 4, x_3 = 3$. The number of such lists that can be formed is
$$\binom{8 + 2}{2} = \binom{10}{2} = \frac{10!}{8!2!} = \frac{10 \cdot 9}{2} = 45$$
To solve the problem $x_1 + x_2 + x_3 = 8$ subject to the restrictions $x_1 \geq 2$ and $x_3 \geq 3$, let
\begin{align*}
y_1 & = x_1 - 2\\
y_2 & = x_2\\
y_3 & = x_3 - 3
\end{align*}
Then $x_1 = y_1 + 2$ and $x_3 = y_3 + 3$, so we obtain
\begin{align*}
y_1 + 2 + y_2 + y_3 + 3 & = 8\\
y_1 + y_2 + y_3 & = 3
\end{align*}
Applying the same method we used above to the equation $y_1 + y_2 + y_3 = 3$ gives
$$\binom{3 + 2}{2} = \binom{5}{2} = 10$$
solutions in the non-negative integers.
To solve the problem $x_1 + x_2 + x_3 = 8$ in the non-negative integers subject to the restrictions $x_1 \leq 2$ and $x_3 \leq 3$, we must subtract the number of solutions in which $x_1 \geq 3$ or $x_3 \geq 4$ from the $45$ solutions of the equation in the non-negative integers. To do so, we subtract the number of solutions in which $x_1 \geq 3$ and the number of solutions in which $x_3 \geq 4$, then add the number of solutions in which both $x_1 \geq 3$ and $x_3 \geq 4$ since those solutions would otherwise be subtracted from the total number of solutions twice.
The number of solutions of the equation $x_1 + x_2 + x_3 = 8$ in which $x_1 \geq 3$ is the number of solutions of the equation
\begin{align*}
y_1 + 3 + y_2 + y_3 & = 8\\
y_1 + y_2 + y_3 & = 5
\end{align*}
in the non-negative integers, which is
$$\binom{5 + 2}{2} = \binom{7}{2} = 21$$
The number of solutions of the equation $x_1 + x_2 + x_3 = 8$ in which $x_3 \geq 4$ is the number of solutions of the equation
\begin{align*}
y_1 + y_2 + y_3 + 4 & = 8\\
y_1 + y_2 + y_3 & = 4
\end{align*}
in the non-negative integers, which is
$$\binom{4 + 2}{2} = \binom{6}{2} = 15$$
The number of solutions of the equation $x_1 + x_2 + x_3 = 8$ in which $x_1 \geq 3$ and $x_3 \geq 4$ is the number of solutions of the equation
\begin{align*}
y_1 + 3 + y_2 + y_3 + 4 & = 8\\
y_1 + y_2 + y_3 & = 1
\end{align*}
in the non-negative integers, which is
$$\binom{1 + 2}{2} = \binom{3}{2} = 3$$
Hence, the number of solutions of the equation $x_1 + x_2 + x_3 = 8$ in the non-negative integers in which $x_1 \leq 2$ and $x_3 \leq 3$ is $45 - 21 - 15 + 3 = 12$.