It is referred to as "Cardano's cubic formula" and one proof can be found here:
http://www.literka.addr.com/mathcountry/algebra/cubic.htm
But the basic idea is very simple. let x= a- b. Then [itex]x^3= a^3- 3a^2b+ 3ab^2- b^3[/itex]. Also [itex]3abx= 3ab(a- b)= 3a^2b- 3ab^2[/itex]. Adding those [itex]x^3+ 3abx= a^3- b^3[/itex]. In particular, if we let 3ab= m and [itex]a^3- b^3= n[/itex], x= a- b satisifies [itex]x^3+ mx= n[/itex].
What about the other way around? If we know m and n, can we find a and b and so find x= a- b satisfying the equation? Yes, we can.
From 3ab= m, b= m/(3a) and so [itex]b^3= m^3(3^3a^3)[/itex]. (Yes, I know [itex]3^3= 27[/itex] but I you will see why I want to leave it like that.)
Then [itex]n= a^3- b^3= a^3- m^3/(3^3a^3)[/itex]. Multiply both sides of that by [itex]a^3[/itex] to get [itex]na^3= (a^3)^2 m^3/3^3[/itex] so [itex](a^3)^2- na^3+ m^3/3^3[/itex], a quadratic in [itex]a^3[/itex]. By the quadratic formula
[tex]a^3= \frac{n\pm \sqrt{n^2- 4\frac{m^3}{3^3}}}{2}[/tex]
Factoring a 2 out of the numerator and canceling the 2 in the denominator gives
[tex]a^3= \frac{n}{2}\pm \sqrt{\left(\frac{n}{2}\right)^2- \left(\frac{m}{3}\right)^3}[/tex]
Since [itex]n= a^3- b^3[/itex], [itex]b^3= a^3-n[/itex] and so
[tex]b^3= -\frac{n}{2}\pm \sqrt{\left(\frac{n}{2}\right)^2- \left(\frac{m}{3}\right)^3}[/tex]
That is the formula rasmhop is using.
Notice that my original equation, [itex]x^3+ mx= n[/itex] has no [itex]x^2[/itex] term. It is what rasmhop called a "depressed cubic". Given a "regular" cubic, [itex]ax^3+ bx^2+ cx+ d[/itex], you can always define, say, y= x+ u, so that x= y- u, plug that into the equation, and then choose u so that the coefficient of the [itex]y^2[/itex] is 0. Solve that "depressed cubic" for y and use x= y- u to find x.