I am asked to decompose the mentioned polynomial, but I don't know how to do it.
Here are some hints:
Consider $p=2$.
Consider $p$ is odd, and then use a suitable change of variables.
This is what I've thought:
I know that $p=2$ implies $q(x)=x^{2}+2x+1=(x+1)^{2}$.
Also, if $p$ is odd, then there exists an integer number $k$ such that $p=2k+1$. Therefore, $q(x)=x^{2k+1}+(2k+1)x^{2k}+2k$. And so, $q(x+1)=(x+1)^{2k+1}+(2k+1)(x+1)^{2k}+2k$. Yet, this doesn't seem to be very helpful.
I am also asked to prove that $\frac{\mathbb{Z}[x]}{(q(x))}$ is an integral domain (I suppose it is enough to prove that $(q(x))$ is a prime ideal, but how can I do it?) and that $\frac{\frac{\mathbb{Z}}{pZ}[x]}{(\overline{q(x)})}$ is a ring which only has one maximal ideal but not an integral domain (all these things, assuming $p$ is odd).
I will appreciate any suggestion!
To elaborate on my comment: Assume that $p$ is an odd prime, and let $f(X)=X^p +pX^{p-1}+p-1\in \mathbb{Z}[X]$. We will attempt to use Eisenstein's Criterion. Consider \begin{equation*}f(X+1)=(X+1)^p +p(X+1)^{p-1}+p-1\\ = X^p +1^p +\sum_{i=1}^{p-1}\binom{p}{i}X^{i} +pX^{p-1}+p+ p\cdot\left(\sum_{i=1}^{p-2}\binom{p-1}{i}X^i\right)+p-1.\end{equation*} Note that both summations in the above equation are divisible by $X$, hence the constant coefficient of $f(X+1)=\sum_{i=0}^p a_iX^i$ is $a_0=1+p+p-1=2p$. Furthermore since $p$ divides $\binom{p}{i}$ for all $i<p$, we conclude the following:
It therefore follows by Eisenstein's Criterion that $f(X+1)$ is irreducible in $\mathbb{Z}[X]$, hence so is $f(X)$. Since $\mathbb{Z}[X]$ is a Unique Factorization Domain, it follows that $(f(X))$ is a prime ideal of $\mathbb{Z}[X]$, and thus that $\mathbb{Z}[X]/(f(X))$ is an integral domain.
Finally, modulo $p$ the polynomial $f(X)$ reduces to $$\overline{f(X))}= X^p-1=(X-1)^p\in \mathbb{F}_p[X].$$
Then $\mathbb{F}_p[X]/(f(X))$ has only one maximal ideal, namely $(X-1)$. However it is not an integral domain as $(X-1)^p=0$.