Find r(I) in following cases: a question related to inverse image and nilradical This question is a part of  the question:A formula for the radical of $\mathbb{Z}/n\mathbb{Z}$.
The answerer of this question is suspended till December 2022 and I have a question in 2nd part of his answer.
I am reformulating the question so that it can be understood independently:
Assuming following result to be true: "Let I be an ideal in A. Then r(I)= { $x\in A | x^n \in I$ for some $n\in \mathbb{N}$}.
$\phi : A \to A/I$ is the natural map. Then  prove that $r(I) = \phi^{-1} (N_{A/I})$. N is nilradical there."
I am reading from notes in commutative algebra. $N_{A/I}$ means set of all x in A/I such that $x^n\subseteq I$ for some $n\in \mathbb{N}$
Find the r(I) in following cases.
(i) $\mathbb{Z}$  and $I= 9\mathbb{Z}$
(ii) $\mathbb{Z}$ and $I= 12\mathbb{Z}$.
Nil Radical in (i) is {0,3,6} and Nil Radical in (ii) is {0,6}.
but I am unable to understand how to find inverse image of such a set ie how to find inverse image of  $\phi^{-1} $({0,3,6}) and $\phi^{-1}$( {0,6})?
Now question in answer of hm2020: In line 9 of the answer how is (3) the only prime ideal?
( I might have some more questions in his answer which I will ask you under comments of your answer)
If you have a different approach for this question that is also welcome!
Thanks for any help.
 A: Let $A$ be a commutative ring (with $1\in A$), let $m\subset A$ be a maximal ideal and let $n\geq1$ be an integer.  Then $m/m^n$ is the unique prime ideal in $A/m^n$.
(Note your question is just the case $A=\mathbb{Z}, m=(3), n=2$).
Proof: As $m$ is maximal, given $x\in A$ with $x\notin m$, we have $\lambda\in A$ and $u\in m$ with $x\lambda+u=1$.
Rearranging: \begin{eqnarray*}
1-x\lambda&=&u\\
(1-x\lambda)^n&=&u^n\\
1-xn\lambda +x^2{n\choose 2}\lambda^2-\cdots+x^n(-\lambda^n)&=&u^n\\
x\left(n\lambda -x{n\choose 2}\lambda^2-\cdots-x^{n-1}(-\lambda^n)\right)&=&1-u^n\\
x\left(n\lambda -x{n\choose 2}\lambda^2-\cdots-x^{n-1}(-\lambda^n)\right)&\equiv&1 \mod m^n
\end{eqnarray*}
Thus $x$ is a unit in $A/m^n$.  This tells us that any proper ideal of $A/m^n$ is contained in $m/m^n$, as all elements outside it are units.
So let $p$ be a prime ideal of $A/m^n$.  We have shown $p\subseteq m/m^n$.  For the converse, let $u\in m$.  Then $u^n\equiv 0 \mod m^n$.  Thus $u^n\in p$.  By the prime property of $p$, we can conclude $u\in P$.  Thus $m/m^2\subseteq p$.
So any prime ideal of $A/m^n$ is just $m/m^n$. $\qquad\qquad \Box$
In your case, this says that the only prime ideal of $\mathbb{Z}/(3)^2$ is $(3)$.
For the other part of your question.  Let $n,m\in\mathbb{Z}$.  What is the preimage of $(m)\subset \mathbb{Z}/(n)$, under the quotient map:  $\mathbb{Z}\to \mathbb{Z}/(n)$?
We know $x\in \mathbb{Z}$ maps to $\lambda m \in \mathbb{Z}/(n)$ precisely if $x=\lambda m+ \mu n$.  This is if and only if $\gcd(m,n)$ divides $x$.
Let $d=\gcd(m,n)$.Thus the preimage of $(m)$ is precisely $(d)$.
