The roots of polynomial $ p(x) $ are:
$$ \begin{aligned}x_1 &= 0.5893\\[1 em]x_2 &= -1.3852 \end{aligned} $$The solutions of $ 49x^2+39x-40 = 0 $ are: $ x = -\dfrac{ 39 }{ 98 }-\dfrac{\sqrt{ 9361 }}{ 98 } ~ \text{and} ~ x = -\dfrac{ 39 }{ 98 }+\dfrac{\sqrt{ 9361 }}{ 98 }$.
You can use step-by-step quadratic equation solver to see a detailed explanation on how to solve this quadratic equation.