Solution (source code)

= Solution

For an irreducible cubic over $\mathbb Q$, the Galois <group> is $A_3$ when its discriminant is a rational square and $S_3$ otherwise. The rational-root test shows that the first two cubics are irreducible.

For $X^3-21X-22$,
$$
\Delta=23976=2^3\,3^4\,37
$$
is not a square, so the Galois <group> is $S_3$.

For $X^3-21X-28$,
$$
\Delta=15876=126^2,
$$
so the Galois <group> is $A_3\cong C_3$.

Finally,
$$
X^3-21X-34=(X+2)(X^2-2X-17),
$$
whose remaining roots are $1\pm3\sqrt2$. Its splitting field is $\mathbb Q(\sqrt2)$ and its Galois <group> is $C_2$.