Why this proof of that equation does not have rational roots works In my textbook proof looks like this:
For equation $x^4 - 3x^3 + x + 2$ Let's suppose that $p/q$ is a root
Then following true
$(p/q)^4 -3(p/q)^3 + p/q + 2 = 0$
Multiplying by $q^4$ we have
$p^4 - 3p^3q + pq^3 + 2q^4 = 0$
Proof consists in that left part is not divisible by $q$ when the right is it.
Why this proof by contradiction works?
 A: That proof is missing one statement.  "Let's suppose $p/q$ is a rational root with $\gcd(p,q) = 1$ and $q > 1$."  Notice that for every way to write a rational number, we can make its denominator positive by usual arithmetic rules and can make the numerator and denominator relatively prime by reducing to lowest terms.
(There is something sneaky in the above.  When we take $q > 1$, the rest of the argument is correct.  However, this omits what to do when $q = 1$.  The argument in the book does not resolve whether there are integer roots.  As a very simple example, $x-1 = 0$ has an integer root.  This argument gives $p/q - 1 = 0$, so $p-q=0$.  If we force $q > 1$, then $q$ does not divide $p$.  However, $q = 1$ is a perfectly valid choice, and $1$ does divide $p$, so the argument in the book is missing the case $q = 1$.)
Then at the end, $q$ divides each of $3p^3q$, $pq^3$, $2q^4$, and $0$.  (The latter by $q \cdot 0 = 0$.)  But, because they are relatively prime, $q$ does not divide $p$, so $q$ does not divide $p^4$.  Therefore $q$ does not divide $p^4 -3p^3q + pq^3 + 2q^4$.
In detail, $q$ cannot divide $p^4$ because when we reduced $p/q$ to lowest terms, we ensured that the prime factorizations of $p$ and $q$ do not both contain the same prime.  Suppose a prime is in both factorizations.  Then that prime divides the $\gcd(p,q)$, but since $p/q$ is in lowest terms, $\gcd(p,q) = 1$, so is not divisible by any prime.  The prime factorization of $p^4$ only contains copies of the primes in the prime factorization of $p$, so contains none of the primes in the factorization of $q$, so cannot be divisible by $q$.  This last follows from unique factorization into primes -- up to sign and the ordering of the factors every integer has a unique factorization into primes.
This produces a contradiction: if we assume that there is a rational root, $p/q$ (which we are free to assume is already in lowest terms), we find that $q$ divides $p^4 -3p^3q + pq^3 + 2q^4$.  But this contradicts that $p/q$ is in lowest terms because it requires that $q$ divides $p^4$.  Since the assumption that there is a rational root leads to a contradiction, there is no rational root.
A: By Rational Root Theorem, we only need to check $±1,±2$.
Then, we can easily deduce that any rational root doesn't exist.
Your textbook proof is also works.
If $q>1, ~ \gcd (p,q)=1$ and $x=\dfrac p q$ where $p,q \in\mathbb Z$ then
$$3p^3q- pq^3-p^4 =2q^4$$
$$p(3p^2q-q^3-p^3)=2q^4$$
This means $\gcd(p,q)>1$, which gives a contradiction.

Small Supplement:

*

*We can always choose $p$ or $q$, such that $p>0$ or $q>0$.  For convenience, we can accept $q>0.$


*If $q=1$ and $\gcd(p,q)=1$. Then
$$p(3p^2-p^3-1)=2$$
This implies $p=±1,p=±2$, which gives again a contradiction.
A: Not quite addressing your question, per se, and you've accepted Eric's answer, but still this might be useful to you... This is the "rational root theorem," in this particular case.
First of all, $x=0$ is not a root. Assume now that $x=p/q$, with $p$ and $q$  relatively prime (cancel out any common factor), non-zero.
You can rewrite your equation as $$p \cdot \text{stuff} = -2 q^4.$$ That means that $p$ divides $2 q^4$. If $p$ and $q$ are relatively prime, it means that $p$ must divide $2$. So $$p=\pm 1, \pm 2.$$ Likewise,  rewriting, your equation says $$ p^4 = q\cdot \text {other stuff}.$$
So $q$ must be a factor of $p^4$. But again, if $p$ and $q$ are relatively prime, you must have that $q=\pm 1$. So your only possibilities for a rational root $p/q$ are $\pm 2/1, \pm 1/1= \pm 2, \pm 1$. Try out the four choices. If none work, then there is no rational root.
