Exercise 3.29 in Atiyah-Macdonald asks to show that the map $f^*:\text{Spec}(B)\to\text{Spec}(A)$ (induced by a ring homomorphism $f:A\to B$), is a continuous closed mapping for the constructible topology.
I have no trouble showing that it is a closed mapping, but I am stuck showing continuity.
Here's my progress so far:
it suffices to show that preimages of closed sets in $\text{Spec}(A)$ are closed in $\text{Spec(B)}$. A closed set in $\text{Spec}(A)$, by definition, has the form $g^*(\text{Spec}(C))$ for some ring $C$ and ring homomorphism $g:A\to C$.
So we want $f^{*-1}(g^*(\text{Spec}(C))$ to be closed in $\text{Spec}(B)$, i.e. of the form $h^*(\text{Spec}(D))$, for some ring $D$ and ring homomorphism $h:B\to D$.
I strongly suspect the ring $D$ must be $B\otimes_AC$ and $h:B\to D$ given by $h(b)=b\otimes1_C$. We have
\begin{align*} f^{*-1}(g^*(\text{Spec}(C))&=\{\mathfrak q\in\text{Spec}(B)|\ f^*(\mathfrak q)\in g^*(\text{Spec}(C)\} \\&=\{\mathfrak q\in\text{Spec}(B)|\ f^*(\mathfrak q)\in(h\circ f)^*(\text{Spec}(D))\} \\&=\{\mathfrak q\in\text{Spec}(B)|\ f^*(\mathfrak q)\in f^*(h^*(\text{Spec}(D))\} \\&\supseteq\{\mathfrak q\in\text{Spec}(B)|\ \mathfrak q\in h^*(\text{Spec}(D))\}=h^*(\text{Spec}(D)) \end{align*} The second equality follows from Exercise 25 of Chapter 3 of the book (see p.s.): $(h\circ f)^*(\text{Spec}(D))=f^*(\text{Spec}(B))\cap g^*(\text{Spec}(C))$.
I can't show why the reverse inclusion holds in the last line (if it holds, since I am not entirely sure $D$ is the correct ring).
Thanks!
p.s. exercise 25 of chapter 3 has a typo, for $A\to B\otimes_AC$ sending $a\mapsto f(a)\otimes g(a)$ is not in general a ring homomorphism. What they mean is the ring homomorphism $a\mapsto f(a)\otimes 1_C=1_B\otimes g(a)$. Same typo repeated on page 31 of the book.