$\DeclareMathOperator{\Spec}{Spec}$
Let $A \subset B$ be an integral extension of rings. Consider the map $f:\Spec B \to \Spec A$ by $f(Q) = Q^c = Q \cap A$. Show that $f$ is a closed map.
My idea was to consider a typical closed set $V(I)$ of $\Spec B$ and show that $f[V(I)] = V(I^c)$.
The inclusion $(\subset)$ was easy to show. It is the reverse direction that I am struggling with.
Here's what I have done: Consider $P \in V(I^c)$. Thus, $P \in \Spec A$ and $P \supset I^c$.
Note that the extension $A/I^c \hookrightarrow B/I$ is integral and $P/I^c$ is a prime in $A/I^c$.
Then, by the lying over theorem, it follows that there exists a prime $Q/I \in \Spec(B/I)$ contracting to $P/I^c$.
Thus, we have gotten hold of a prime ideal $Q \in V(I).$ I am now not sure how to prove that $Q \cap A = P$. (Is this even true?)
An alternate approach could have been to directly use the lying over theorem for $P$ to conclude that there exists a prime $Q \in \Spec B$ lying over $P$. But then it wasn't clear why $Q \supset I$.