$(x-2)P(x)=x^2-4$ is given.
Question is simple. Is $P(x)$ a polynomial or not?
$P$ is not necessarily a polynomial. For example, the following (discontinuous) function works:
$$ P(x) = \begin{cases} x + 2 \quad &\text{if $x \neq 2$} \\ a \quad &\text{if $x = 2$} \end{cases} $$ where $a$ can be any real value.