Q:

Question about composition of morphisms of schemes (Mumford's)

On section 7 of Chapter 2 of Mumford's Red Book, there is the following statement:
Suppose $X\stackrel{f}{\rightarrow}Y\stackrel{g}{\rightarrow}Z$ are morphisms of schemes, such that $g$ is of finite type, $f$ is surjective and $g\circ f$ is proper. Then $g$ is proper.
As I've said in my previous questions, I'm not quite familiar with algebraic geometry, and I can't figure out how to use the universally closure property together with the hypothesis about the surjectivity of $f$ to conclude that $g$ is proper. So, my question is, how to prove this.
Thank you very much for your attention.

A:

Given a base extension $Z'\rightarrow Z$ we want to prove that $g_{(Z')}:Y\times_ZZ'\rightarrow Z'$ is closed. Since surjectivity is preserved under base extension then the map $f\times 1_{Z'}:X\times_Z Z'\rightarrow Y\times_ZZ'$ is surjective implying that any closed subset of $Y\times_ZZ'$ is of the form $f\times 1_{Z'}(E)$ for some closed subset $E$ of $X\times_ZZ'$. The map $(g\circ f)_{(Z')}:X\times_ZZ'\rightarrow Z'$ is closed by the hypothesis on $g\circ f$. Now it is easy to see that $g_{(Z')}\circ(f\times 1_{Z'})=(g\circ f)_{(Z')}$ and from this and the remarks above it follows that $g_{(Z')}$ is closed.

