The trick is transforming the general cubic equation into a new cubic equation with missing $x^2$ term is due to Nicolo Fontana Tartaglia.
Apply the substitution
$ x = y - \frac{b}{3a} $
then we get
$ a\left(y-\frac{b}{3a} \right)^3 + b\left(y-\frac{b}{3a} \right)^2+c\left(y-\frac{b}{3a} \right)+d = 0 $
which simplifies to
$ ay^3 + \left( c-\frac{b^2}{3a}\right)y+ \left(d + \frac{2b^3}{27a^2} - \frac{bc}{3a} \right) = 0 $
This is called a depressed cubic equation, because the square term is eliminated. It is much easier to use this and then find the roots. (back substitute to get the roots in terms of $x$)
For example $2x^3-18x^2+46x-30=0$
Substitute $ x=y+3$ and simplify this cubic equation to
$2y^3-8y=0 \Rightarrow y=0,2,-2$ which then gives the roots as $x=1,3, $ and $5$.