if $p=ab$ $\implies p|ab$
If $p$ is irreducible then either $a$ or $b$ is a unit.
If $a$ is a unit, then
$a^{-1}p=b$
or, $b \in <p>$ $ \implies b=pt \implies p|b$
Thus $p$ is prime
Something must be wrong here because I didn't use the fact that given ring is a principal ideal domain.
Let $a,b\in R$. You need to assume that $p\mid ab$ and $p\nmid a$ and then show that $p\mid b$. How do you do this? The correct prove is here, have a look.