### how to check algebraic equations?

So, i got a different cubic formula for the depressed equation than that was there in the standard formula from a book.
$y^3+fy+g=0 $ has the solution

$ ({-g+\sqrt {g^2/4-f} })^{1/3} + ({-g-\sqrt {g^2/4-f} })^{1/3} $

$
~~\left{y ~~\left\{y : -\frac{f}{3 \, {\left(-\frac{1}{2} \, g + \frac{1}{6} \,
\sqrt{\frac{4}{3} \, f^{3} + 9 \, g^{2}}\right)}^{\frac{1}{3}}} +
{\left(-\frac{1}{2} \, g + \frac{1}{6} \, \sqrt{\frac{4}{3} \, f^{3} + 9
\, ~~g^{2}}\right)}^{\frac{1}{3}}\right}
~~g^{2}}\right)}^{\frac{1}{3}}\right\}
$

So I want to check the algebraic equivalence of these two equations step by step, and how I can convert the first equation into the second, as they are both the same.

This is like checking algebra formulas like ~~$(a+b)^2=a^2+b^2+2ab$~~$(a+b)^2=a^2+b^2+2ab$
If nothing else, i want to just check True or False, just like with numbers, but equations instead.