Elementary Level Algebra Question I'm trying to solve the following homework problem:
If $a\neq b$, $a^3-b^3 = 19x^3$ and $a-b=x$, which of the following conclusions is correct?
\begin{align}
\text{(1) }& a = 3x \\
\text{(2) }& a = 3x \text{ or } a = -2x \\
\text{(3) }& a = -3x \text{ or } a = 2x \\
\text{(4) }& a = 3x \text{ or } a = 2x
\end{align}

I am getting option (4): $a = 3x$ or $a=2x$ as the answer, which is incorrect. The correct answer is $a=3x$ or  $a=-2x.$
My work:-
$$ (a-b)^3 + 3ab(a-b)=19x^3$$
$$x^3 + 3ab(x) = 19x^3$$
$$ab=6x^2$$
Hence by comparing we have,
$$a * b = 3x * 2x \text{  or  } a * b = 2x * 3x$$
So a can be either $2x$ or $3x$.
Why is my answer wrong?
 A: Use difference of cubes.
$$a^3-b^3 = (a-b)(a^2+ab+b^2)$$
$$\implies (a-b)(a^2+ab+b^2) = 19x^3$$
Set $\color{purple}{a-b = x}$.
$$\implies \color{purple}{x}(a^2+ab+b^2) = 19x^3 \implies a^2+ab+b^2 = 19x^2$$
Set $\color{blue}{b = a-x}$.
$$\implies a^2+a\color{blue}{(a-x)}+\color{blue}{(a-x)}^2 = 19x^2$$
Move $19x^2$ to the LHS, expand, and simplify.
$$\implies a^2+a^2-ax+a^2-2ax+x^2-19x^2 = 0$$
$$\implies 3a^2-3ax-18x^2 = 0$$
$$\implies a^2-ax-6x^2 = 0$$
Factor the trinomial.
$$\implies (a-3x)(a+2x) = 0$$
Set either factor equal to $0$.
$$a = 3x \text{ or } a = -2x$$
Edit: You’ve asked where your error is. Your comparison part wasn’t correct.
$$ab = 6x^2$$
You can’t just jump to conclusions on what $a$ and $b$ can be. Here, make the substitution $\color{blue}{b = a-x}$.
$$a\color{blue}{(a-x)} = 6x^2$$
$$a^2-ax = 6x^2 \implies a^2-ax-6x^2 = 0$$
This leads to the same answer.
A: You're losing signs in your division. You actually also have the options
$$ ab = (-3x)(-2x)= 6x^2 \text{  or  } ab = (-2x)(-3x) = 6x^2 $$
To check, you need to plug all of these into your original constraint. This is easy to do since you know that $ b = a -x$. With $a = 2x$ you get $b=-x$, and if you plug this into your second constraint you get
$$ (2x)^3 - (-x)^3 = 8x^3 + x^3 \neq 19x^3 $$
I'll leave it to you to test $a=-2x$.
A: The work you did till you reached ab=6x^2 is all good
But thats when you went wrong you chose a=3x and a=2x
For a=3x b=2x its all good but for a=2x b=a-x=x so ab=2x^2 in this case you are wrong so what solves this is a=-2x
In general for you to be able to solve such equation without guessing you just substitute b by its value:
a(a-x)=6x^2 
a^2-ax=6x^2
a^2-ax-6x^2=0
You want the value of a so you solve this equation for a:
Delta=b^2-4ac=x^2+24x^2=25x^2
So a=3x or a=-2x
