Let $K$ be the field with $9$ elements. I am asked to study the irreducibility of the polynomial $f:=X^3-X^2+1$ over $K[X]$.
I proceeded as follows. $\mathbb{Z}[i]/3\mathbb{Z}[i]$ is a field with $9$ elements, so $K\cong \mathbb{Z}[i]/3\mathbb{Z}[i]$. If $\phi$ is an isomorphism from $K$ to $\mathbb{Z}[i]/3\mathbb{Z}[i]$, then we may construct a ring homomorphism $\overline{\phi}: K[X] \to (\mathbb{Z}[i]/3\mathbb{Z}[i])[X]$ such that $\overline{\phi}(X)=X$ and $\overline{\phi}(a)=\phi(a)$ for any $a \in K$ via the universal property of the polynomial ring . It is pretty straightforward to show that $\overline{\phi}$ is an isomorphism.
Since $\overline{\phi}(f)=X^3-X^2+\hat{1}$ and $X^3-X^2+\hat{1}$ is irreducible over $(\mathbb{Z}[i]/3\mathbb{Z}[i])[X]$ (it has no roots in $\mathbb{Z}[i]/3\mathbb{Z}[i]$), it follows that $f$ is irreducible over $K[X]$: if it were reducible, we would have $f=gh$ for some nonconstant polynomials $g, h \in K[X]$. This would imply that $\overline{\phi}(f)=\overline{\phi}(g)\overline{\phi}(h)$, so since our $\overline{\phi}$ obviously preserves degree, we would get that $X^3-X^2+\hat{1}$ is reducible over $(\mathbb{Z}[i]/3\mathbb{Z}[i])[X]$, which would be a contradiction.
I would like to know if my solution is correct or if I am missing something.
Suppose it is reducibile over $\mathbb{F}_9[X]$. Then exists such $a\in \mathbb{F}_9$ that: $a^3=a^2-1;\;(*)$. Clearly $a^9=a$ and $a\ne 0$. So we have \begin{align} (a^2-1)^3 =a&\implies a^6-3a^4+3a^2-a=1\\ &\implies a^4-3a^3+a^2+2a=0\\ &\implies 2a^2=a+1\\ &\implies a^2 = a+2\\ &\implies a=-3\\ (*)&\implies 0=-1\\ \end{align} A contradiction.