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?

Let $a,b$ be the roots. 
Then $a,b$ are roots of 
$$x^3+Ax+10=0$$
The sum of the three roots of this polynomial is negative the coefficient of $x^2$, thus $0$. It follows that the third root is $-(a+b)$. 
As the product of the three roots is $-10$ we get
$$ab(a+b)=10$$
Now let $c$ be the third root of 
$$x^3+Bx^2+50=0$$
Then
$$ab+ac+bc =0$$
or 
$$ab+c(a+b)=0$$
and
$$abc=-50$$
Replacing $a+b=\frac{10}{ab}$ we get
$$(ab)^2+10c =0$$
$$abc=-50$$
Multiply the first of these two equations by $ab$ and you are done.
