Given a monic polynomial $f(x)$ of degree $n$ over $Z$ and $k, p \in N$ , prove that if none of the numbers $f(k), f(k + 1),..., f(k + p)$ is divisible by $p + 1$, then $f(x) = 0$ has no rational solution.
Question from 'Problem solving Strategies'.
Here is the solution
Can anyone please explain why the polynomial $g(x)$ should have integral coefficients (2nd line of solution)?

You can use division algorithm since $x-m$ has leading coefficient 1.
Alternatively, from division algorithm of $\mathbb R$ and factor theorem you can write in that way where $g(x)$ has real coefficients. Now suppose $g(x)=b_0+b_1x+...+b_nx^n$ consider $f(x)= a_0+...+a_{n+1}x^{n+1}$ where $a_i\in \mathbb Z, \forall i$.
Now compute the product.
The leading term is $b_n=a_{n+1}\in \mathbb Z$ now $a_n= b_{n-1}-mb_n \in \mathbb Z \Rightarrow b_{n-1} \in \mathbb Z$ use induction on $n$ to complete the proof.