The roots of polynomial $ p(x) $ are:
$$ \begin{aligned}x_1 &= -2.3108\\[1 em]x_2 &= 0.7611+0.3233i\\[1 em]x_3 &= 0.7611-0.3233i\\[1 em]x_4 &= -0.6151+0.8942i\\[1 em]x_5 &= -0.6151-0.8942i\\[1 em]x_6 &= 1.0094+1.656i\\[1 em]x_7 &= 1.0094-1.656i \end{aligned} $$Polynomial $ x^7-x^5+8x^4-2x^3+x^2-9x+7 $ has no rational roots that can be found using Rational Root Test, so the roots were found using Newton method.