# of finite presentation morphism

A morphism $$f:X\rightarrow Y$$ of schemes is called locally of finite presentation if for any $$x\in X$$, there exists an affine open neighborhood $$V=\mathrm{Spec} B$$ of $$f(x)$$ in Y, and an affine open neighborhood $$U=\mathrm{Spec} C$$ of $$x$$ in $$f^{-1}(V)$$ such that $$C$$ is $$B-$$algebra with finite presentation.

I want to prove that given two morphisms $$f:X\rightarrow Y$$ and $$g:Y\rightarrow Z$$ such that $$g$$ is locally of finite type and $$gf$$ is locally of finite presentation, then $$f$$ is locally of finite presentation.

In Fu's book(Etale Cohomology Theory), he says we can prove the proposition above from the fact that locally of finite presentation is stable under base change and composition, and the diagonal morphism $$\Delta_{Y/Z}:Y\rightarrow Y\times_Z Y$$ is locally of finite presentation because $$g$$ is locally of finite type.

But I have no idea about how to deduce the proposition.