I am reading this document here by Brian Osserman concerning the Valuative Criteria for properness and separatedness. In particular, I am trying to understand the second half of the proof Proposition 2.5. Here is the proposition:
Proposition $\mathbf{2.5}$. Let $X$ be a scheme, and $x,x'\in X$ with $x$ specializing to $x'$. Then there exists a valuation ring $A$ and a morphism $\operatorname{Spec}A\to X$ with the generic point of $\operatorname{Spec}A$ mapping to $x$, and the closed point of $\operatorname{Spec} A$ mapping to $x'$.
More generally, if $f:X\to Y$ is any morphism, and we have $x\in X$, and $y'\in Y$ a specialization of $f(x)$, then there exists a valuation ring $A$, with fraction field $K$, and a commutative diagram $$\require{AMScd}\begin{CD} \text{Spec }K @>>> X\\@VVV @VVfV\\ \text{Spec }A @>>> Y \end{CD}$$ such that the image of $\operatorname{Spec}K$ is $x$, and the generic and closed points of $\operatorname{Spec}A$ map to $f(x)$ and $y$ respectively.
Now I can understand most of the proof (which is later in the document) except for the following reduction:
Proof of Proposition 2.5. Note that the first statement follows from the second, by taking $f$ to be the identity map. For the second statement, by replacing $Y$ with the closure of $f(x)$ (with the reduced induced subscheme structure), it is clear that we may assume $Y$ is integral, and $f(x)$ is the generic point of $Y$. Then, by Proposition 3.1, there exists a valuation ring $A'$ of $K(Y)$ dominating
My question is: Why can we assume that $Y$ is integral and that the $f(x)$ is the generic point of $Y$? It is clear to me that the map $f$ when restricted to $\overline{\{x\}}$ has image landing in $\{\overline{f(x)}\}$ (this is just continuity of $f$).