Let $f(x) = x^n + a_{n-1}x^{n-1} + \cdots + a_0 \in \Bbb Z[x]$ and $r \in \Bbb Q$. If $x-r \mid f(x)$ and $f(x) \in \Bbb Z[x]$, show that $r \in\mathbb Z$.
Since $x-r\mid f(x)$ and $f(x)$ is primitive, that implies that $f(x) = g(x)(x-r)$ where the product $g(x)(x-r)$ is primitive also. I can't figure how to show that $r$ is an integer here besides saying that in order to take the $\gcd$ of a functions coefficients they must be integers.
Notice that if $x-r$ divides the polynomial $f(x)$, then in particular $f(r)=0$.
I will prove a more general property:
Proof: Suppose $r$ is a root of $f(x)$, then we have
\begin{align*} a_n\left(\frac{p}{q}\right)^n+a_{n-1}\left(\frac{p}{q}\right)^{n-1}+\cdots + a_1\left(\frac{p}{q}\right)+a_0&=0 &\\ a_n\left(\frac{p^n}{q^n}\right)+a_{n-1}\left(\frac{p^{n-1}}{q^{n-1}}\right)+\cdots +a_1\left(\frac{p}{q}\right)&=-a_0 &\\ a_np^n+a_{n-1}p^{n-1}q + a_{n-2}p^{n-2} q^2+\cdots + a_1p q^{n-1}&=-a_0\cdot q^n &\text{(multiplying by $q^n$ in both sides)}\\ p\left(a_np^{n-1}+a_{n-1}p^{n-2}q^2+\cdots+a_1q^{n-1}\right)&=-a_0q^n &\text{(taking $p$ as common factor in LHS)} \end{align*}
That is, $p$ divides $-a_0q^n$, but since $\gcd(p,q)=1$, we necessarily have that $p$ divides $a_0$.
On the other hand, we also got
\begin{align*} a_n p^n&=-a_{n-1}p^{n-1}q-a_{n-2}p^{n-2}q^2-\cdots - a_0q^n\\ &=q\cdot (-a_{n-1}p^{n-1}-a_{n-2}p^{n-2}q-\cdots - a_0q^{n-1}) \end{align*}
So, $q$ divides $a_n\cdot p^n$, but since $\gcd(p,q)=1$, we conclude $q$ divides $a_n$.
Proof: Notice that for $f(x)=x^n+a_{n-1}x^{n-1}+\cdots + a_1x+a_0$, $a_n=1$. If $r=\frac{p}{q}$ is a root of the monic polynomial, then by the Proposition above we have that $q$ divides $1$, that is, $q=1$ or $q=-1$, and so $r=p$ or $r=-p$. In both cases, $r\in\mathbb{Z}$.