The argument boils down to the following:
Since $x_1+...+x_6$ is less that $10$, it is missing something from $10$. Denote this quantity by $x_7$. By doing this you transformed the inequality into an equation, which in this case (and actually often) is easier to solve than an inequality.
Now for the second part: since you need $x_1+...+x_6$ to be strictly less than $10$, it follows that $x_7 \geq 1$. But the technique which you learned (stars and bars probably) works for variables which are non-negative, it doesn't work with restrictions of this form . To fix this note that $x_7-1 \geq 0$, and denote this by a new variable.
It would had probably been more intuitive to observe that $x_1+..+x_6 <10$ in integers is equivalent to $x_1+..+x_6 \leq 9$. Now denote by $x_7$ (or $y_7$) the missing quantity from $9$, which could be $0$, and reduce the problem directly to the second equation.
We want to find the number of integer solutions of the equation
$$x_1 + x_2 + x_3 + x_4 = 30 \tag{1}$$
subject to the restrictions that $x_i \geq 2$, $x_i \neq 5$, for $1 \leq i \leq 4$.
As Severin Schraven pointed out in the comments, we can handle the first condition by defining $x_i = y_i + 2$ for $1 \leq i \leq 4$. Making these substitutions in equation 1 yields
\begin{align*}
y_1 + 2 + y_2 + 2 + y_3 + 2 + y_4 + 2 & = 30\\
y_1 + y_2 + y_3 + y_4 & = 22 \tag{2}
\end{align*}
Equation 2 is an equation in the nonnegative integers. Since a particular solution corresponds to the placement of $4 - 1 = 3$ addition signs in a row of $22$ ones, the number of solutions of equation 2 in the nonnegative integers is
$$\binom{22 + 4 - 1}{4 - 1} = \binom{25}{3}$$
since we must choose which three of the $25$ positions required for $22$ ones and three addition signs will be filled with addition signs.
From these, we must subtract those solutions of equation 1 in which one or more of the $x_i$'s are equal to $5$ or, equivalently, those solutions of equation 2 in which one or more of the $y_i$'s is equal to $3$. Notice that at most three of the $x_i$'s may equal to $3$ since $4 \cdot 3 = 12 < 22$.
If $y_4 = 3$, then
\begin{align*}
y_1 + y_2 + y_3 + 3 & = 22\\
y_1 + y_2 + y_3 & = 19 \tag{3}
\end{align*}
Equation 3 is an equation in the nonnegative integers. Since a particular solution of equation 3 corresponds to the placement of $3 - 1 = 2$ addition signs in a row of $19$ ones, equation 3 has
$$\binom{19 + 3 - 1}{3 - 1} = \binom{21}{2}$$
solutions in the nonnegative integers. By symmetry, there are an equal number of solutions of equation 2 in which $y_1 = 3$ or $y_2 = 3$ or $y_3 = 3$ or $y_4 = 3$. Hence, the number of solutions in which one of the $y_i$'s is equal to $3$ is
$$\binom{4}{1}\binom{21}{2}$$
However, if we subtract this amount from the total, we will have subtracted too much since we will have subtracted each case in which two $y_i$'s are equal to three twice, once for each way we could have designated one of those $y_i$'s as being the one that is equal to $3$. We only want to subtract such cases once, so we must add them back.
If $y_3 = 3$ and $y_4 = 3$, then
\begin{align*}
y_1 + y_2 + 3 + 3 & = 22\\
y_1 + y_2 & = 16 \tag{4}
\end{align*}
Equation 4 is an equation in the nonnegative integers. Since a particular solution of equation 4 corresponds to the placement of $2 - 1 = 1$ addition sign in a row of $16$ ones, equation 4 has
$$\binom{16 + 2 - 1}{2 - 1} = \binom{17}{1}$$
solutions in the nonnegative integers. By symmetry, there are an equal number of solutions of equation 2 for each of the $\binom{4}{2}$ pairs $i, j$ such that $1 \leq i < j \leq 4$ in which $y_i = y_j = 3$. Hence, there are
$$\binom{4}{2}\binom{17}{1}$$
solutions of equation 2 in which two $y_i$'s are equal to $3$.
However, if we add these to our running total, we will have added too much. This is because we first subtracted those cases in which three $y_i$'s are equal to $3$ three times, once for each way we could designate one of the $y_i$'s as being the one that equals $3$, then subtracted them three times, once for each of the
$\binom{3}{2}$ ways we could designate a pair of the $y_i$'s as being the pair $(y_i, y_j)$ with $1 \leq i < j \leq 4$ in which $y_i = y_j = 3$. Hence, we have not subtracted those cases in which three of the $y_i$'s are equal to $3$.
If $y_2 = y_3 = y_4 = 3$, then
\begin{align*}
y_1 + 3 + 3 + 3 & = 22\\
y_1 & = 13 \tag{5}
\end{align*}
which is an equation in the nonnegative integers with one solution. By symmetry, there are an equal number of solutions for each of the $\binom{4}{3}$ ways of selecting triples $(i, j, k)$ with $1 \leq i < j < k \leq 4$ in which $y_i = y_j = y_k = 3$. Hence, there are
$$\binom{4}{3}\binom{13}{0}$$
solutions in which three of the $y_i$'s are equal to $3$.
By the Inclusion-Exclusion Principle, the number of admissible solutions of equation 1 is
$$\binom{25}{3} - \binom{4}{1}\binom{21}{2} + \binom{4}{2}\binom{17}{1} - \binom{4}{3}\binom{13}{0}$$
Best Answer
This can be done with generating functions, as suggested by JMoravitz in a comment, and it's quite possible to do it with a pencil, though you'll probably want to use a calculator to do the arithmetic; I certainly did.
First, to understand the comment, note that $x_1$ and $x_2$ are each represented by the polynomial $$x^4+x^5+x^6+\dots+x^{29}.$$ This is because $4\leq x_1,x_2\leq29$. Similarly, $x_3$ and $x_4$ are each represented by the polynomial $$x^{10}+x^{11}+\dots+x^{40}.$$ Finally, $x_5$ and $x_6$ are each represented by the polynomial $$1+x+x^2+\dots+x^{109}$$ Since the sum is to be $109$, neither $x_5$ nor $x_6$ can be more than $109$, and they must be $\geq0$.
To multiply these $6$ polynomials, we choose a term from each polynomial, multiply them together, and add up the products over all choices of terms. The coefficients in the polynomials are all $1$, so the coefficient of $x^n$ in the product, for some natural number $n$, is just the number of ways to pick one term from each polynomial such that the sum of their exponents is $n$. When $n=109$, this is just the solution to our problem. For example, the solution $x_=20,x_2=14,x_3=30,x_4=30,x_5=15,x_6=0$ corresponds to choosing the terms $x^{20},x^{14},x^{30},x^{30},x^{15},1$ from the polynomials, in order.
Now it's just a matter of figuring out the coefficient of $x^{109}$ without multiplying the polynomials.
I'll use the notation $[x^n]p(x)$ to mean the coefficient of $x^n$ in the formal power series $p(x)$. We want $$c=[x^{109}]\left(x^4+\cdots+x^{29}\right)^2 \left(x^{10}+\cdots+x^{40}\right)^2 \left(1+x+x^2+\cdots\right)^2 $$ Note that we don't need an upper bound on the $x_5$ and $x_6$. It doesn't matter if we include exponents $>109$ in the polynomial, because they won't contribute anything to the coefficient of $x^{109}$ in the product. As you'll see, this simplifies the calculation, because we have two fewer factor of the numerator this way.
Then, using the formula for a geometric series,$$ \begin{align} c&=[x^{109}]\left(x^4-x^{30}\right)^2 \left(x^{10}-x^{41}\right)^2(1-x)^{-6}\\ &=[x^{81}]\left(1-x^{26}\right)^2 \left(1-x^{31}\right)^2 \sum_{n=0}^\infty\binom{-6}{n}(-x)^n\\ &=[x^{81}](1-2x^{26}+x^{52})(1-2x^{31}+x^{62}) \sum_{n=0}^{81}(-1)^n\binom{n+5}{5}(-x)^n\\ &=[x^{81}](1-2x^{26}-2x^{31}+x^{52}+4x^{57}+x^{62}) \sum_{n=0}^{81}\binom{n+5}{5}x^n\\ \end{align}$$
since we may ignore terms of degree $>81$.
We just need to pick out the terms in the product that result in a term of degree $81.$ We have $$ \binom{86}{5}-2\binom{60}5-2\binom{55}5+\binom{34}5+4\binom{29}5+\binom{24}5=17,741,536 $$