# Separatedness of a composition, where one morphism is surjective and universally closed.

I'm stuck with the following problem: Let $f:X \rightarrow Y$ and $g:Y \rightarrow Z$ be scheme morphisms such that f is surjective and universally closed and such that $g \circ f$ is separated. The claim is then that g is also separated.

I've been trying to use the fact that f is (as any surjective morphism) universally surjective, and somehow deduce that the diagonal $\Delta(Y)$ is closed in $Y \times_Z Y$ but I haven't gotten that far. I would love some hints on how to do this. Full answers are OK, but I would prefer to have hints! Thank you!

-

You know that the image $\Delta_X (X)$ of $X$ under $\Delta_X$is closed in $X\times_Z X$, because $g\circ f$ is separated .
Take the image $Im=(f\times f) (\Delta_X (X)) \subset Y\times_Z Y$ of this closed set $\Delta_X (X)$ under $f\times f$ .
This image $Im$ is then closed in $Y\times_Z Y$ (because $f$ is universally closed) and it coincides with...