Lemma 1 Let $X, Y$ be integral noetherian affine schemes. Let $f\colon X \rightarrow Y$ be a dominant morphism of finite type. Then $f(X)$ contains a non-empty open subset of $Y$.
Proof: Let $X = Spec(B), Y = Spec(A)$. Since $X, Y$ are integral noetherian schemes, $A$ and $B$ are noetherian integral domains. Since $f$ is a dominant morphism, we may assume that $A$ is a subring of $B$. Since $f$ is a morphism of finite type, $B$ is a finitely generated $A$-algebra. Taking $b = 1$ in Exercise II. 3.19 (b), there exists a non-zero element $a$ of $A$ with the following property. If $\psi\colon A \rightarrow \Omega$ is any homomorphism of $A$ to an algebraically closed field $\Omega$ such that $\psi(a) \neq 0$, then $\psi$ extends to a homomorphism $\phi\colon B \rightarrow \Omega$.
Since $a \neq 0$, $D(a)$ is not empty. We claim that $D(a) \subset f(X)$. Let $P \in D(a)$. Let $K$ be the field of fractions of $A/P$. Let $\Omega$ be an algebraic closure of $K$. Let $\psi\colon A \rightarrow \Omega$ be the composition $A \rightarrow A/P \rightarrow K \rightarrow \Omega$. Since $\psi(a) \neq 0$, $\psi$ extends to a homomorphism $\phi\colon B \rightarrow \Omega$. Let $Q$ be the kernel of $\phi$. Then $Q$ is a prime ideal of $B$ lying over $P$. Hence $P \in f(X)$. Hence $D(a) \subset f(X)$ as desired. QED
Lemma 2 Let $X, Y$ be affine noetherian schemes. Suppose $Y$ is irreducible. Let $f\colon X \rightarrow Y$ be a dominant morphism of finite type. Then $f(X)$ contains a non-empty open subset of $Y$.
Proof: Suppose $X = X_1\cup\cdots\cup X_n$, where each $X_i$ is an irreducible closed subset of $X$. Then $f(X) = f(X_1)\cup\cdots\cup f(X_n)$. Hence $Y = \overline {f(X)}$ $= \overline{f(X_1)} \cup\cdots\cup \overline{f(X_n)}$. Since $Y$ is irreducible, $Y = \overline{f(X_i)}$ for some $i$. We regard $X_i$ as a reduced closed subscheme of $X$. Let $f_i\colon X_i \rightarrow Y$ be the composition $X_i \rightarrow X \rightarrow Y$. Applying Lemma 1 to $(f_i)_{red}\colon (X_i)_{red} \rightarrow Y_{red}$, we are done. QED
Lemma 3 Let $f\colon X \rightarrow Y$ be a morphism of affine schemes. Let $Z$ be a closed subscheme of $Y$. Then $p\colon X\times_Y Z \rightarrow X$ is a closed immersion and $p(X\times_Y Z) = f^{-1}(Z)$.
Proof: Suppose $X =$ Spec$(B), Y =$ Spec$(A), Z =$ Spec$(A/I)$. Then $X\times_Y Z$ = Spec$(B/IB)$ and we are done.
Proof of the theorem of Chevalley By Exercise II. 3.19 (a), we may assume that $X$ and $Y$ are integral noetherian affine schemes and $Z = X$. By noetherian induction, it suffices to prove the following assertion. Let $F$ be a closed subset of $Y$. If for every closed subset $G$ of $Y$ such that $G$ is a proper subset of $F$, $f(X) \cap G$ is constructible in $Y$, then $f(X) \cap F$ is constructible in $Y$.
Clearly we may assume $F$ is irreducible. Suppose $f(X) \cap F$ is not dense in $F$. Let $G$ be the closure of $f(X) \cap F$ in $F$. Since $G \neq F$, $f(X) \cap G$ is constructible in $Y$ by the induction assumption. Since $f(X) \cap F \subset f(X) \cap G \subset f(X) \cap F, f(X) \cap F = f(X) \cap G$. Hence $f(X) \cap F$ is constructible in $Y$.
Suppose $f(X) \cap F$ is dense in $F$. By Lemma 3, we regard $f^{-1}(F)$ as a closed subscheme of $X$. Then $f$ induces a morphism $g\colon f^{-1}(F) \rightarrow F$. Since $f(X) \cap F = f(f^{-1}(F))$, $g$ is dominant. Hence by lemma 2, $f(X) \cap F$ contains a non-empty open subset $U$ of $F$. Then $f(X) \cap F = U \cup (f(X) \cap (F - U))$. By the induction assumption, $f(X) \cap (F - U)$ is constructible in $Y$. Hence $f(X) \cap F$ is constructible in $Y$ as desired. QED