Question: Suppose $P(x)$ is a polynomial with $P(2)=2017$ and $P(5)=2002$. If it is given that $P(x)=0$ has exactly one integer root, find that root.
My approach: I tried solving the problem by considering that $P(x)\in\mathbb{Z}[x]$ and that $$P(x)=a_nx^n+a_{n-1}x^{n-1}+\cdots+a_0.$$ Then $P(5)\equiv a_0 \pmod 5\implies 2002\equiv a_0 \pmod 5\implies a_0\equiv 2\pmod 5.$ Again, $P(2)\equiv a_0 \pmod 2 \implies 2017\equiv a_0 \pmod 2\implies a_0\equiv 1 \pmod 2.$ Thus, we have $$\begin{cases}a_0\equiv 1\pmod 2,\\a_0\equiv 2\pmod 5.\end{cases}$$ By solving the same we can conclude that $a_0\equiv 7 \pmod {10}.$
Also if $a$ is the only integer root of $P(x)$, then there exists $Q(x)\in \mathbb{Z}[x]$ with $\deg (Q(x))=n-1$ such that $$P(x)=(x-a)Q(x).$$ Thus, we have $$(2-a)Q(2)=2017,\text{ and }(5-a)Q(5)=2002=2\times 7\times 11\times 13.$$
After this I couldn't make any significant approach. I also understand that I shouldn't have made the assumption of $P(x)\in\mathbb{Z}[x]$, but that's the best I could think of.
Can anyone help me progress (initially a small hint would be nice)?