Spec(A), ring homomorphism

Let $\displaystyle \phi: A \rightarrow B$ be a ring homomorphism. Let $\displaystyle X=\text{Spec}(A)$ and $\displaystyle Y= \text{Spec}(B)$. If $\displaystyle q \in Y$, then $\displaystyle \phi^{-1}$ is a prime ideal of $\displaystyle A$, i.e., a point of $\displaystyle X$. Hence $\displaystyle \phi$ induces a map $\displaystyle \phi^*:Y \rightarrow X$. Show that:

If $\displaystyle \phi$ is surjective, then $\displaystyle \phi^*$ is a homeomorphism of Y onto the closed subset $\displaystyle V(\text{ker}(\phi))$ of .

[$\displaystyle V(E)$ denotes the set of all prime ideals of $\displaystyle A$ which contain $\displaystyle E$].

Here is one way to do it:

By the "Ideal Correspondence Theorem," we know that $\displaystyle {\color{red} \phi^*(Y)=V(\text{ker}(\phi))}$ and $\displaystyle {\color{red}\phi^*}$ induces a bijective map from $\displaystyle {\color{red}Y}$ to $\displaystyle {\color{red}V(\text{ker}(\phi))}$. Then I need to show $\displaystyle \phi^{*-1}$ is continuous and $\displaystyle \phi^*$is continuous to show it is a homeomorphism.

I don't understand the sentence in red. How do we know $\displaystyle \phi^*$ induces a bijective map from $\displaystyle Y$ to $\displaystyle V(\text{ker}(\phi))$?