Is this proof correct ?
Let $R$ be a PID. Prove $p\in R$ is prime if and only if $p\in R$ is irreducible.
Proof:
$\implies$
Let $p\in R$ and p prime.
Let $ab=p\in\langle p\rangle.$ Thus $p\mid ab$ and $p\mid a$ or $p\mid b$.
w.l.o.g suppose $p\mid a.$ Then $a=kp,$ for some $k\in R$.
$\implies p=ab=kpb \implies p(1-kb)=0 \implies 1-kb=0 \implies b=1 \implies p $ is irreducible.
$\Leftarrow $ (this side of the proof was based on Xam's proof :)
Let D be an euclidean domain and $p\in D$ irreducible.
Let $ab=p\in\langle p\rangle$. Thus $p\mid ab$.
Now if $p$ doesn't divides a, then we have to prove $p\mid b.$
Suppose $u=px+ay,$ for some $x,y\in D.$
$\implies bu=bpx+bay$
$\implies p\mid bay$ and $p\mid bpx$
$\implies p\mid bu$
As $ub\mid b,$ then $p\mid b$. Therefore $p$ is prime.