Find a and b, that there are two roots of $x^3 - 5x^2+ 7x = a$ and these numbers are roots of $x^3 - 8x + b = 0$ Find a and b, that there are two roots of $x^3 - 5x^2+ 7x = a$, that they are roots of $x^3 - 8x + b = 0$
I find that $a+b=5x(-x+3) $
Also I tried to solve second equation to get roots, depending on b, but my approach was unsuccessful.
Any help is appreciated!

They are roots of the equation
$$x^2=3x-\frac{a+b}{5},$$ which you got.
Thus, since $x^3-8x+b=0$ has these two roots, we see that the equation
$$x\left(3x-\frac{a+b}{5}\right)-8x+b=0$$ or
$$x^2-\frac{1}{3}\left(\frac{a+b}{5}+8\right)x+\frac{b}{3}=0$$
has these two roots.
Thus, we have the following system
$$\frac{1}{3}\left(\frac{a+b}{5}+8\right)=3$$ and
$$\frac{b}{3}=\frac{a+b}{5},$$
which gives $a=2$ and $b=3$.
