The roots of polynomial $ p(p) $ are:
$$ \begin{aligned}p_1 &= 6\\[1 em]p_2 &= 1 \end{aligned} $$The solutions of $ p^2-7p+6 = 0 $ are: $ p = 1 ~ \text{and} ~ p = 6$.
You can use step-by-step quadratic equation solver to see a detailed explanation on how to solve this quadratic equation.