Let $f: R \rightarrow S$ be a ring homomorphism, with $R$ and $S$ commutative and $f(1)=1$. If $P$ is a prime ideal of $S$, show that the preimage $f^{-1}(P)$ is a prime ideal of $R$.
Define $g: S \rightarrow S/P$ with kernel $s$. Let $h = g \circ f: R \rightarrow S/P$. Since $h$ is a ring homomorphism, the kernel is an ideal of $R$. Also, from the first isomorphism theorem, we know that $R/\ker(h) \cong S/P$. Since $P$ is a prime ideal of $S$, we know that $S/P$ is an integral domain. Since $R/\ker(h)$ is isomorphic to $S/P$, it must also be an integral domain, which implies that the kernel of $h$ (which is the preimage of $P$) is a prime ideal of $R$.
Do you think my answer is correct? The reason why I was a bit skeptical of my answer is because I did not use the fact that $R$ and $S$ are commutative. So I'm wondering if I missed something $\dots$
Thank you in advance.