Consider the cubic equation
$$ x^3 + bx^2 + cx + d = 0$$
If one replaces $x$ with $x - {b\over 3}$ then this reduces to
$$ x^3 + px + q = 0$$
If one knows what to substitute with then checking the claim is easy. But my question is:
How does one see which substitution to make? How do I know that it simplifies if I replace $x$ with $x - {b\over 3}$?
Recall that $-b$ is the sum of the roots of $ x^3 + bx^2 + cx + d = 0.$ That is, if the roots are $r_{1},\,r_{2},\,r_{3},$ then $(r_1 + r_2 + r_3) = -b.$ See Vieta's formulas if this is new to you.
Now note that if the graph is shifted right by $\frac{b}{3},$ which can be done by replacing $x$ with $x - \frac{b}{3},$ then each of the roots of the new equation is additively increased by $\frac{b}{3}.$ Thus, the roots of the equation you get by replacing $x$ with $x - \frac{b}{3}$ are $r_{1} + \frac{b}{3} ,\,r_{2} + \frac{b}{3},\,r_{3} + \frac{b}{3},$ and the sum of these roots is
$$\left(r_{1} + \frac{b}{3}\right) \; + \; \left(r_{2} + \frac{b}{3}\right) \; + \; \left(r_{3} + \frac{b}{3}\right) \;\; = \;\; (r_1 + r_2 + r_3) \; + \; \left(\frac{b}{3} + \frac{b}{3} + \frac{b}{3}\right) = \; -b + b = 0 $$
Since the sum of the roots of the new equation is $0,$ it follows (again, by Vieta's formulas) that the coefficient of $x^2$ in the new cubic polynomial is $0.$
In general, if you replace $x$ with $x - \frac{b}{n}$ in the equation $x^n + bx^{n-1} + \cdots = 0,$ then the coefficient of the $x^{n-1}$ term is $0$ for the polynomial you get after the replacement. For what it's worth, note also that what you're doing is shifting right by the arithmetic mean of the roots.