Let $R, S$ be rings and assume $R/pR\cong S/pS$. If necessary, we also assume that $R$ and $S$ are $p$-torsion-free. I'd like to ask why $R/p^nR\cong S/p^nS$ holds for all $n\geq1$? I think it suffices to consider the case for $n=2$.
Any help will be appreciated.
Consider $R = \mathbf Z[i]$ and $S = \mathbf Z[\sqrt{2}]$. In each ring $2$ has just one prime above it: $2 = -i(1+i)^2$ and $2=\sqrt{2}^2$. The $2$-adic completion of $R$ is $\mathbf Z_2[i]$ and the $2$-adic completion of $S$ is $\mathbf Z_2[\sqrt{2}]$. These rings are of rank $2$ over $\mathbf Z_2$ and are not isomorphic rings since the first has no solution of $x^2 = 2$ and the second has no solution of $x^2= -1$.