My proof is different from the one my professor gave me, so I'm just checking that it's valid.
Let $R$ be an integral domain and suppose $p\in R$ is prime. Then, $P$ is a prime ideal.
Suppose, to the contrary, that $p$ is a unit. Then $\exists p^{-1}\in R$ such that $pp^{-1}=1$. Since $P$ is an ideal, $pp^{-1}=1\in P$. This implies that $P = R$, contradicting the fact that this cannot happen for a prime ideal. So $p$ is not a unit.
Now suppose that $p=ab$, for some $a,b \in R$. Then $ab\in P$. Since $P$ is a prime ideal, either $a\in P$ or $b\in P$. WLOG, suppose that $a\in P$. Then, $ab-a=0\in P$. This implies that $ab=a$, and by the cancellation property of integral domains, $b=1$, a unit. Hence, $p$ is irreducible QED
solution-verificationquestion to be on topic you must specify precisely which step in the proof you question, and why so. This site is not meant to be used as a proof checking machine. – Bill Dubuque Apr 04 '24 at 02:26