I wanted to ask if you could verify my proof for the statement given in the title. Here is my work:
Suppose $x^n \in \mathfrak{p}.$ Since $x^n=x^{n-1}x,$ by the definition of a prime ideal, either $x^{n-1}$ or $x$ is in $\mathfrak{p}.$ If $x \in \mathfrak{p}$ then we are done. Suppose not. Then $x^{n-1}=x^{n-2}x \in \mathfrak{p}.$ If $x \in \mathfrak{p}$ then again we are done. If not, then $x^{n-2}=x^{n-3}x \in \mathfrak{p}.$ Continuing this way we can conclude inductively that $x \in \mathfrak{p}.$
Thank you.