Let $\phi : A \rightarrow B$ be a ring homomorphism and $I$ be a prime ideal of $B$.
(i) Show that $\phi^{-1}(I)$ is a prime ideal of $A$, and
(ii) find an example of $A$, $B$ and $I$ so that $I$ is a maximal ideal, but $\phi^{-1}(I)$ is not (a maximal ideal).
(i)
Let $x,y \in A$ with $xy \in \phi^{-1}(I)$ $\Rightarrow \exists z \in I: \phi(x) \phi(y) = \phi(xy) = z \in I$ $\Leftrightarrow x \in \phi^{-1}(I)$ or $y \in \phi^{-1}(I) \Rightarrow \phi^{-1}(I)$ is a prime ideal of A.
Can you please check my answer, is it (formally) correct?
(ii)
I have no clue how the example could look like, can you please help me with this?
(i) looks correct.
(ii): Consider $\varphi : \mathbb Z \to \mathbb Q$ the inclusion map. This is a ring homomorphism. $0$ is a maximal ideal in $\mathbb Q$, but $\varphi^{-1}(0) = 0$ is not a maximal ideal in $\mathbb Z$: pick any prime $p$ and notice that $0 \subsetneq (p) \subsetneq \mathbb Z$.