Question: I am not able to take this question.My question is "Find the number of ways that can 12 persons take seats in a row of 20 fixed seats so that every person has exactly one neighbour"

My Attempt: I have started assuming that $x\_0$ be the number of vacant seats before the first person and $x\_1$ be the number between second and third and so on. Am i taking it right or wrong? Please guide if there is another way.

Answer: 
There will be $8$ seats not taken. Write down $8$ stars, like this, with a gap between them.
$$\ast\qquad\ast\qquad\ast\qquad\ast\qquad\ast\qquad\ast\qquad\ast\qquad\ast$$

These determine $9$ gaps, of which $7$ are interstar gaps, and $2$ are endgaps. We need to **choose** $6$ of these gaps, and slip a couple of chairs in the chosen gaps. The choosing can be done in $\binom{9}{6}$ ways. 

If we are interested in who sits where, multiply by $12!$.

*Added:* The approach begun in the OP will work. We end up with $7$ variables $x\_0$ to $x\_6$ that have sum $8$. Close to a basic Stars and Bars problem, except that the "end" variables can be $0$, while the variables $x\_1$ to $x\_5$ must be $\ge 1$. We can break into cases, though there is a trick that gets us $\binom{9}{6}$ directly.
*A way using stars and bars*

* Form clumps of People and Empty chairs as below:

${\huge\boxed.}\; P P E\;{\huge\boxed.}\; P P E\;{\huge\boxed.}\; PPE\;{\huge\boxed.}\; PPE\;{\huge\boxed.}\; PPE\;{\huge\boxed.}\; P P\;{\huge\boxed.}$

* Place the $3$ remaining chairs in the boxes in $\binom{3+7-1}{7-1}$ ways
* Permute the individuals in $12!$ ways