Number of ways to put $16$ black balls and $6$ white balls in a row with restrictions. What are the number of ways to put $16$ black balls and $6$ white balls in a row such that there is a white ball on each side, and an even number $\geq 2$ of black balls between every 2 white balls?
I thought I could approach this as following:
We have $5$ spaces between our $6$ white balls.
Lets define them as $x_1,...x_5$.
We know that $x_1 + ... + x_5 = 16\;$ but $x_i$ is even and $\geq 2$ foreach $1\leq i \leq 5$
Therefore we can conclude: $x_1 + ... + x_5 = 6\;$
Now, we have $6$ white balls to spread between our "spaces" such that we'll have to keep them even. 
Therefore we can conclude again : $2x_1 + ... + 2x_5 = 6\;$
$x_1 + ... + x_5 = 3\;$
So the final answer is $\binom{7}{4} = 35$
Is this the right way to approach this question?
 A: Your answer is correct.  However, as JMoravitz pointed out in the comments, your notation needs correcting since you are using the same variables to mean different things.
Let $x_i$, $1 \leq i \leq 5$, be the number of black balls in the $i$th space.  Then
$$x_1 + x_2 + x_3 + x_4 + x_5 = 16 \tag{1}$$
where each $x_i$ is a positive even number. Let $x_i = 2y_i$.  Then
\begin{align*}
2y_1 + 2y_2 + 2y_3 + 2y_4 + 2y_5 & = 16\\
y_1 + y_2 + y_3 + y_4 + y_5 & = 8 \tag{2}
\end{align*}
Since there are at least two black balls between each white ball, each $y_i$ is a positive integer.
A particular solution of equation 2 corresponds to the placement of four addition signs in the seven spaces between consecutive ones in a row of eight ones. 
$$1 \square 1 \square 1 \square 1 \square 1 \square 1 \square 1 \square 1$$
For instance, if we place addition signs in the second, third, fifth, and seventh spaces, we obtain
$$1 1 + 1 + 1 1 + 1 1 + 1$$
which corresponds to the solution $y_1 = 2$, $y_2 = 1$, $y_3 = 2$, $y_4 = 2$, $y_5 = 1$ (and $x_1 = 4$, $x_2 = 2$, $x_3 = 4$, $x_4 = 4$, $x_5 = 2$).  The number of such solutions is the number of ways we can place four addition signs in the seven spaces between successive ones in a row of eight ones, which is 
$$\binom{7}{4}$$
as you found.
A: Your approach is correct, essentially using Stars and Bars.
I get the same answer with a generating function approach. I pictured this as a string starting with one $w$ and finishing with a collection of $bbw$, $bbbbw$, $bbbbbbw$, etc.
We want a string of length $6+16=22$. The $w$ at the beginning is fixed, so we concentrate on the remaining $21$ letters including the $5$ other $w$s. Thus, I looked at
$$
\begin{align}
&\left[x^{22}\right]\overbrace{\quad\ x\quad\ \vphantom{x^3}}^w\left(\vphantom{x^3}\right.\overbrace{\quad\ x^3\quad\ }^{bbw}+\overbrace{\quad\ x^5\quad\ }^{bbbbw}+\overbrace{\quad\ x^7\quad\ }^{bbbbbbw}+\cdots\left.\vphantom{x^3}\right)^5\\[6pt]
&=\left[x^{6}\right]\left(1+x^2+x^4+\cdots\right)^5\\[6pt]
&=\left[x^{3}\right]\left(1+x+x^2+\cdots\right)^5\\[6pt]
&=\left[x^{3}\right]\frac1{(1-x)^5}\\
&=(-1)^3\binom{-5}{3}\\
&=\binom{7}{3}\\[6pt]
&=35
\end{align}
$$
