Show that $x$ is a generator of $(\mathbb{Z}_3[x]/\langle x^3+2x+1\rangle)^*$. I don't understand part of the solution.
$x^3+2x+1$ is irreducible in $\mathbb{Z}_3$. Let $a$ be a zero of $x^3+2x+1$ in some extension field of $\mathbb{Z}_3\implies \mathbb{Z}_3(a)\simeq \mathbb{Z}_3[x]/\langle x^3+2x+1\rangle$.
$\mathbb{Z}_3[x]/\langle x^3+2x+1\rangle \simeq GF(3^3) \implies (\mathbb{Z}_3[x]/\langle x^3+2x+1\rangle)^* \simeq GF(27)^*\simeq \mathbb{Z}_{26}$. Let $x\in (\mathbb{Z}_3[x]/\langle x^3+2x+1\rangle)^*$, then $|x|$ divides $26\implies |x|\in \{1,2,13,26\}$. But the solution says $|x|\neq 1,2$ because $(x-1),(x^2 - 1)\notin \langle x^3+2x+1\rangle$. I understand why $(x-1),(x^2 - 1)\notin \langle x^3+2x+1\rangle$ but don't understand why we are looking for zeroes in $\mathbb{Z}_3[x]/\langle x^3+2x+1\rangle$ to find the generator? Thanks and appreciate a hint.
First of all $x \notin \langle x^3+2x+1 \rangle$ which means that in fact $x \in R = (\mathbb{Z}_3[x]/\langle x^3+2x+1\rangle)^*$. Let $n = \lvert x \rvert$. Then $x^n = 1$ in $R$ which is equivalent to $x^n = 1$ in $\mathbb{Z}_3[x]/\langle x^3+2x+1\rangle$. The latter means $x^n - 1 = 0$ in $\mathbb{Z}_3[x]/\langle x^3+2x+1\rangle$ which is equivalent to $x^n -1 \in \langle x^3+2x+1 \rangle$. Since $(x-1),(x^2 - 1)\notin \langle x^3+2x+1\rangle$, you can exclude $n = 1, 2$. By polynomial long division you also see that $n = 13$ can be excluded.
Note that it is essential to consider the equation $x^n - 1 = 0$ in the full ring $\mathbb{Z}_3[x]/\langle x^3+2x+1\rangle$ because $0 \notin R$.