IMO Longlist 1983, p.23
It is enough to consider only case $p,q \in \mathbb{N}$. Let $\frac{p_0}{q_0}=\frac{p}{q}$ and $\gcd(p_0,q_0) = 1$.
Lets try to serach for $P(x)$ having the following representation:
(1) $P(x)= \frac{p_0}{q_0} + a_3\left(x-\frac{p_0}{q_0}\right)^3 + a_4\left(x-\frac{p_0}{q_0}\right)^4 ...+ a_n\left(x-\frac{p_0}{q_0}\right)^n$, $I=\left[\frac{p_0}{q_0}-\frac{1}{2q}, \frac{p_0}{q_0}+\frac{1}{2q}\right]$.
We have:
(2) $ \left|P(x)-\frac{p}{q}\right| < \frac{1}{q^2}\left(\frac{1}{2^3}\left|\frac{a_3}{q_0}\right| + \frac{1}{2^4} \left|\frac{a_4}{q_0^2}\right|+\cdots+ \frac{1}{2^n} \left|\frac{a_n}{q_0^{n-2}}\right|\right)$.
If we manage to choose $a_i,\,i=3,4,\cdots$, so that:
(i) $\forall i=3,4,\cdots,n ,\, a_i= b_i\cdot q_0^{i-2}$, where $b_i \in \{-1,0,1\}$.
(ii) $P(x)$ in (1) is with integral coefficients.
then (2) and (i) will yield: $ |P(x)-\frac{p}{q}| < \frac{1}{q^2},\, \forall x \in I $.
Notice that if $a_i$ satisfy (i) then all coefficients at $x^j,\, j>1$ in (1) will be integers.
Coefficient at $x^1$ in (1) is:
(3) $\frac{1}{q_0}\left( b_3 \binom{3}{1} p_0^{2} + b_4 \binom{4}{1} p_0^{3} + \cdots \right)$.
Coefficient at $x^0$ is:
(4) $ \frac{1}{q_0^2} \left( p_0q_0 + b_3 p_0^3 + b_4 p_0^4 + \cdots \right)$.
Let now choose: $n=(p_0q_0+2)\varphi(q_0^2)q_0$ and $b_i =-1$, when $i= k.\varphi(q_0^2)q_0,\, k=3,4,\cdots,p_0q_0+2 $, otherwise $b_i=0 $.
Because $b_i\neq 0$ only when $q_0|i \,\, \Rightarrow$ (3) is integer.
From $p_0^{kq_0\varphi(q_0^2)} \equiv 1 \pmod{q_0^2},\, k= 3,4,\cdots,p_0q_0+2$ follows that (4) is also integer.