remainder of polynomial division 
The polynomial $P$ gives a remainder of $5x-7$ when divided by $x^2 -1$. Find the remainder when $P$ is divided by $x-1$.

I know we can use Bezout's theorem. Thus for $x-1$ the remainder will be $-2$. I am just not sure if this is the correct answer.
 A: Yes, the remainder will be $-2$. We know that:
\begin{align*}
P(x) &= Q_1(x)(x^2 - 1) + (5x - 7) \\
P(x) &= Q_2(x)(x - 1) + r
\end{align*}
where $Q_1(x)$ and $Q_2(x)$ are some polynomials and $r$ is a constant. By setting $x = 1$, we know from the first equation that $P(1) = -2$. Doing likewise for the second equation yields $r = -2$.
A: Hint $\ {\rm mod}\,\ x\!-\!1\!:\,\ \color{#c00}{x\equiv 1}\,\Rightarrow\, (\color{#c00}x^2\!-\!1)q(\color{#c00}x) + r(\color{#c00}x) \,\equiv\, (\color{#c00}1^2\!-\!1)q(\color{#c00}1) + r(\color{#c00}1)\,\equiv\, r(\color{#c00}1)\,$ by $\:\equiv$ Rules.
Remark $\ $ Generally note that $\ P\equiv r\pmod{\!fg}\,\Rightarrow\,P\equiv r\pmod{\! f},\ $ by $\,f\mid fg\mid P-r,\ $ i.e. congruences descend to divisors of the modulus. Above is special case $\,f,g = x\!-\!1,x\!+\!1,\,$ which yields $\ P\equiv r(x)\pmod{\!x^2\!-\!1}\,\Rightarrow\, P\equiv r(x) \pmod{\!x\!-\!1}.\,$ But $\ r(\color{#c00}x)\equiv r(\color{#c00}1)\pmod{x\!-\!1}.$
A: $$P(x) =  (x^2-1)q(x) + (5x-7)$$
By remainder theorem, $P(1)$ is the remainder when $P(x)$ is dvided by $x-1$; so you may simply evaluate $P(1)$
