Let $p$ be a prime integer. For $x\in\mathbb{Z}$, let $x'$ be the remainder of $x$ when divided by $p$. Let $\sum_{i=0}^{n}a_iX^i\in \mathbb{Z}[X]$ with $p$ does not divide $a_n$ in $\mathbb{Z}$. Then prove:
(1). by considering the map $\phi:\mathbb{Z}\rightarrow \mathbb{Z}_p$, $\sum_{i=0}^{n}a_iX^i$ is irreducible in $\mathbb{Q}[X]$ if $\sum_{i=0}^{n}\phi(a_i)X^i$ is irreducible in $\mathbb{Z}_p[X]$.
(2). $\sum_{i=0}^{n}\phi(a_i)X^i$ is irreducible in $\mathbb{Z}_p[X]$ does not imply $\sum_{i=0}^{n}a_iX^i$ is irreducible in $\mathbb{Z}[X]$.
I am only clear for the case $a_n=1$, then Gauss Lemma can be applied. I really have no idea to solve...
Suppose your polynomial $q$ is reducible (over $\mathbb{Z}$) then, if you reduce the factors mod $p$ you get a factorization mod $p$ (unless one of the factors is a constant, but that's not possible by your condition on $a_n$).
As for part $2,$ you seem to have your cases switched around; as stated it is the negation of part (1), so they can't both be true.