The irreducible quadratics are those without a factor of \(x,x+1\text{,}\) or \(x+2\text{.}\) The monic reducible ones are therefore
\begin{align*}
x^2 \amp \amp (x+1)^2\amp=x^2+2x+1 \amp (x+2)^2\amp=x^2+x+1 \\
x(x+1)\amp =x^2+x \amp x(x+2)\amp=x^2+2x \amp (x+1)(x+2)\amp=x^2+2
\end{align*}
The other three monic quadratics are thus irreducible, as are those obtained by multiplying these by \(2\text{:}\)
\begin{equation*}
x^2+2x+2, \qquad x^2+x+2, \qquad x^2+1
\end{equation*}
Similarly, the irreducible cubics are those without a factor that is either linear or one of the three irreducible quadratics. We can get cubics with those factors by either cubing one of the three linear factors or multiplying one linear and one quadratic. So there are a total of 12 reducible monic cubics and thus the other 15 are irreducible along with the 15 obtained by multiplying them by
\(2\text{.}\)