Algebra Manipulation Contest Math Problem The question was as follows:
The equations $x^3+Ax+10=0$ and $x^3+Bx^2+50=0$ have two roots in common. Compute the product of these common roots.
Because $x^3+Ax+10=0$ and $x^3+Bx^2+50=0$ it means that  $x^3+Ax+10=x^3+Bx^2+50$
Take $x^3+Ax+10=x^3+Bx^2+50$ and remove $x^3$ from both sides, you get $Ax+10=Bx^2+50$ or $Bx^2-Ax+40=0$
By the quadratic equation, we get $\frac {A \pm \sqrt {(-A)^2 - 4*40B}}{2B}=\frac {A \pm \sqrt {A^2 - 160B}}{2B}$ 
This gives us two answers: $\frac {A + \sqrt {A^2 - 160B}}{2B}$  and $\frac {A - \sqrt {A^2 - 160B}}{2B}$ 
$\frac {A + \sqrt {A^2 - 160B}}{2B} * \frac {A - \sqrt {A^2 - 160B}}{2B}=\frac {A^2 -  {A^2 - 160B}}{4B^2}$ 
This simplifies as $\frac {160B}{4B^2}=\frac{40}{B}$
$\frac{40}{B}$ is an answer, but in the solutions, they expected an integer answer. Where did I go wrong?

Hint: The common roots must be both roots of
$$- (x^3 + Ax +10 ) + (x^3 + Bx^2 + 50) = Bx^2 - Ax + 40 $$
Let this quadratic polynomial be denoted by $f(x)$.
Hint: We have
$$ f(x) ( \frac{1}{B} x + \frac{5}{4} ) = x^3 + Bx^2 + 50. $$
This gives $B^2 = 4A$ and $160=5AB$, so $5B^3 = 640 $. This gives $B = 4 \sqrt[3]{2} $, $ A = 4\sqrt[3]{4}$.
This does not give me an integer answer for $ \frac{40}{B} = 5 \sqrt[3]{4}$, so perhaps they had an error?
