Your answer is correct, up to some assumptions and the missing case where $p$ is even.
Here's an answer in terms of modular arithmetic. This also skips the factoring stuff.
In general, if $m\equiv n\pmod D$, and $f$ is a polynomial with integer coefficients, then $f(m)\equiv f(n)\pmod D$. (This at heart can be seen by the fact that $\mathbb Z\to \mathbb Z/D$ is a ring automorphism, but it can be seen more directly by noting that $m-n\mid m^k-n^k$ for any integer $k\geq 0$.)
The above conditions mean $f(a)\equiv f(b)\equiv 1\pmod 2$ and $a\equiv 1\pmod 2$ and $b\equiv 0\pmod 2$.
For any integer $m$, either $m\equiv 1\equiv a\pmod 2$ or $m\equiv 0 \equiv b\pmod 2$. This means that $f(m)\equiv f(a)\equiv 1\pmod 2$ or $f(m)\equiv f(b)\equiv 1\pmod 2$. Therefore, $f(m)\equiv 1\pmod 2$ for all $m$, and hence $f(m)$ is odd, therefore $f(m)\neq 0$.
Note how this works in general. If $D$ is any number and $f(a)\not\equiv 0\pmod D$ then if $m\equiv a\pmod D$ then $f(m)\not\equiv 0\pmod D$, and in particular $m$ is not a root of $f(x)$.
If you don't know modular arithmetic, you can still note that $m-n\mid f(m)-f(n)$. In particular, if $m-a$ is even, then $2\mid m-a \mid f(m)-f(a)$ so $f(m)$ is odd since $f(a)$ is odd. If $m-b$ is even, then similarly, $2\mid f(m)-f(b)$ and therefore $f(m)$ is again odd since $f(b)$ is odd. Since one of $m-a$ and $m-b$ must be even, you are done.