Spec(A), ring homomorphism

Let be a ring homomorphism. Let and . If , then is a prime ideal of , i.e., a point of . Hence induces a map . Show that:

If is surjective, then is a homeomorphism of Y onto the closed subset of .

[ denotes the set of all prime ideals of which contain ].

Here is one way to do it:

By the "Ideal Correspondence Theorem," we know that and induces a bijective map from to . Then I need to show is continuous and is continuous to show it is a homeomorphism.

I don't understand the sentence in red. How do we know induces a bijective map from to ?