To follow up:

Since \(\displaystyle P(-1)=0\) , we know by the factor theorem then that \(P(x)\) must have as a factor \(x+1\). We can use synthetic division to complete part (b):

\(\displaystyle \begin{array}{c|rr}& 2 & -5 & 0 & 6 & -1 \\ -1 & & -2 & 7 & -7 & 1 \\ \hline & 2 & -7 & 7 & -1 & 0 \end{array}\)

And so, we conclude:

\(\displaystyle P(x)=(x+1)\left(2x^3-7x^2+7x-1\right)\)