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 x^3= a^3- 3a^2b+ 3ab^2- b^3. Also 3abx= 3ab(a- b)= 3a^2b- 3ab^2. Adding those x^3+ 3abx= a^3- b^3. In particular, if we let 3ab= m and a^3- b^3= n, x= a- b satisifies x^3+ mx= n.
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 b^3= m^3(3^3a^3). (Yes, I know 3^3= 27 but I you will see why I want to leave it like that.)
Then n= a^3- b^3= a^3- m^3/(3^3a^3). Multiply both sides of that by a^3 to get na^3= (a^3)^2 m^3/3^3 so (a^3)^2- na^3+ m^3/3^3, a quadratic in a^3. By the quadratic formula
a^3= \frac{n\pm \sqrt{n^2- 4\frac{m^3}{3^3}}}{2}
Factoring a 2 out of the numerator and canceling the 2 in the denominator gives
a^3= \frac{n}{2}\pm \sqrt{\left(\frac{n}{2}\right)^2- \left(\frac{m}{3}\right)^3}
Since n= a^3- b^3, b^3= a^3-n and so
b^3= -\frac{n}{2}\pm \sqrt{\left(\frac{n}{2}\right)^2- \left(\frac{m}{3}\right)^3}
That is the formula rasmhop is using.
Notice that my original equation, x^3+ mx= n has no x^2 term. It is what rasmhop called a "depressed cubic". Given a "regular" cubic, ax^3+ bx^2+ cx+ d, 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 y^2 is 0. Solve that "depressed cubic" for y and use x= y- u to find x.