<s>[INST] If $x^3+y^3=72$ and $xy=8$ then find the value of $x-y$. I recently came across a question,

If $x^3+y^3=72$ and $xy=8$ then find the value of $(x-y)$.

By trial and error I found that $x=4$ and $y=2$ satisfies both the conditions. But in general how can I solve it analytically? I tried using $a^3+b^3=(a+b)(a^2+b^2-ab)$ and also $a^3+b^3=(a+b)^3-3ab(a+b)$. But both ways aren't working.
Please explain how do I solve these types of questions analytically. 
 [/INST] Hint: 
$$x^3+y^3=72\text{ and }x^3y^3=512.$$
You know the sum, and you know the product of two cubes.

The cubes are $\dfrac{72\pm\sqrt{72^2-4\cdot 512}}2$, $8$ and $64$.

</s>