How many solutions are there for $3x_1+3x_2+x_3+x_4=30$? 
Find how many solutions there are for $$ 3x_1+3x_2+x_3+x_4=30$$

I know how to solve this: $x_1+x_2+x_3+x_4=30$
and I read this link, but I am still not sure about my answer.
I wrote:
$x_4+x_3=30-3(x_1+x_2) $
then I get this: $0 \le x_1+x_2 \le 10$ (that I know to solve: $66$ combination)
and now I'm not sure what to do with $x_3+x_4$.
 A: If you are allowing $x_i$ to be greater than or equal to $0$ in the equation $\color{red}{3x_1}+\color{blue}{3x_2}+\color{green}{x_3}+\color{brown}{x_4}=30$, then if we consider the expansion $$\displaystyle 
\color{red}{\left((x^3)^{0}+(x^3)^1+(x^3)^2+\cdots\right)}\color{blue}{\left((x^3)^{0}+(x^3)^1+(x^3)^2+\cdots\right)}\color{green}{\left(x^0+x^1+x^2+\cdots\right)}\color{brown}{\left(x^0+x^1+x^2+\cdots\right)}$$
Then the number of solutions to the given equation will be the coefficient of $x^{30}$ in the above expansion (Why?).
Now we simplify it a bit, we know that $1+x+x^2+\cdots$ is a geometric progression whose sum equals $\dfrac{1}{1-x}$.
Using this, our expansion becomes, $$\dfrac{1}{\color{red}{(1-x^3)}\color{blue}{(1-x^3)}\color{green}{(1-x)}\color{brown}{(1-x)}}=(1-x^3)^{-2}(1-x)^{-2}$$
Now using binomial theorem, we can rewrite it as $$\left[\sum_{k=0}^{\infty}\binom{k+1}{k}x^{3k} \right]\left[\sum_{r=0}^{\infty}\binom{r+1}{r}x^r\right]$$
So coefficient of $\displaystyle x^{3k+r}=\binom{k+1}{k}\binom{r+1}{r}=(k+1)(r+1)$ and when $r=30-3k$, it is $(k+1)(31-3k)$ which is summed over from $k=0$ to $k=10$ which turns out to be the same summation as written by @Aqua, but note that with this, we can solve it even if there were restrictions on $x_i$, for example, if it were given that $1\le x_1 \le 5$, and rest everything the same, then we would only consider the product $$\displaystyle 
\color{red}{\left((x^3)^{1}+(x^3)^2+(x^3)^3+\cdots+(x^3)^5\right)}\color{blue}{\left((x^3)^{0}+(x^3)^1+(x^3)^2+\cdots\right)}\color{green}{\left(x^0+x^1+x^2+\cdots\right)}\color{brown}{\left(x^0+x^1+x^2+\cdots\right)}$$ and proceed accordingly.
A: Using stars and bars method, it is easy to establish this lemma:
Lemma. The number of solutions of equation $$x_1+x_2+...+x_k =n$$ where $x_1,x_2,...x_k$ are nonnegative integers, is ${n +k-1\choose n}$.

For each $k\in \{0,1,...,10\}$ the number of solution to $x_1+x_2= k$ is ${k+1\choose 1}=k+1$ and the number of solution to $x_3+x_4 = 30-3k$ is ${31-3k\choose 1} = 31-3k$.
So the total number of solutions is \begin{align}\sum _{k=0}^{10}(31-3k)(k+1)&=\sum _{k=0}^{10}(31 +28k-3k^2)\\
&=341 + 28\sum _{k=0}^{10}k-3\sum _{k=0}^{10}k^2\\
&=341 +28 {10\cdot 11\over 2} -3{10\cdot 11\cdot 21\over 6}\\
&= 726
\end{align}
