Question about given $f: X \to Y$ a morphism of schemes, factoring it as $X \to \overline{f(X)} \to Y$ The set up I have is the following. I have a morhpism of schemes $f: X \to Y$, 
$U_1$ and $U_2$ are open affine of $X$ and $f(U_i) \subset V_i$, where $V_i$ is an affine open of $Y$. $X$ and $Y$ are reduced. 
I know that $f_i : U_i \to V_i$, the restriction of $f_i$ to $U_i$, factors as $U_i \to Z_i \to V_i$, where $Z_i = \overline{f(X)} \cap V_i$ with the reduced induced structure. Let me call $g_i: U_i \to Z_i$. 
Since $f_1|_{U_1 \cap U_2}$ and  $f_2|_{U_1 \cap U_2}$ are the same, I would like to deduce that $g_1$ and $g_2$ are the same when restricted to ${U_1 \cap U_2}$. I would appreciate any clarification on how I can do this. Thank you. 
ps What I am trying to do is that given $f: X \to Y$, I want to prove that this factors as $X \to \overline{f(X)} \to Y$, where $\overline{f(X)}$ is with the reduced induced structure.... 
 A: $\newcommand{Ohol}{\mathcal{O}}$
$\require{AMScd}$
$\newcommand{\spec}{\mathrm{spec}}$
$\newcommand{\ideal}[1]{\mathfrak{#1}}$
Let me try to give another answer:
We start with
$$U_1 \xrightarrow{g_1} \overline{f(X)} \cap V_1 \xrightarrow{i_1} V_1$$
and
$$U_2 \xrightarrow{g_2} \overline{f(X)} \cap V_2 \xrightarrow{i_2} V_2$$
Then we have for $U_{12} \subseteq U_1 \cap U_2$, open affine and $V_{12} \subseteq V_1 \cap V_2$, open affine with $f(U_{12}) \subseteq V_{12}$
two sequences
$$U_{12} \xrightarrow{g_{12}} \overline{f(X)} \cap V_{12} \xrightarrow{i_{12}} V_{12}$$
and
$$U_{12} \xrightarrow{g_{21}} \overline{f(X)} \cap V_{12} \xrightarrow{i_{12}} V_{12}$$
Here $g_{12}$ is the restriction of $g_1$ on $U_{12}$ and $g_{21}$ is the restriction of $g_2$ on $U_{12}$. $i_{12}$ is the restriction of $i_1$ on $\overline{f(X)} \cap V_{12}$ which is identical to the restriction of $i_2$ to $\overline{f(X)} \cap V_{12}$.
Now we have, that $i_{12} \circ g_{12} = i_{12} \circ g_{21}$. This implies immediately, that $g_{12} = g_{21}$ because it corresponds to a ring sequence
$$(*) \quad A_{12} \xrightarrow{\pi} A_{12}/\mathfrak{a}_{12} \xrightarrow{\gamma_{12}, \gamma_{21}} B_{12}$$
where $\gamma_{ij}$ corresponds to $g_{ij}$ and $\pi$ corresponds to $i_{12}$.
Now we have $\gamma_{12} \circ \pi = \gamma_{21} \circ \pi$ and so
$\gamma_{12} = \gamma_{21}$ and therefore $g_{12} = g_{21}$. As we can choose different $U_{12}$, $V_{12}$ to cover $U_1 \cap U_2$ and $V_1 \cap V_2$ we can conclude that $g_1|_{U_1 \cap U_2} = g_2|_{U_1 \cap U_2}$.
This may look a bit disappointing, because it boils down to the fact, that if we have scheme maps $f,g:X \to Y$ and $i:Y \to Z$ a closed immersion and we have $i \circ f = i \circ g$, then $f = g$.
So where is the burden of the proof that $\overline{f(X)}$ is well defined and posesses the right properties? Part of it is where you say,
that there is a factorization $U_i \to \overline{f(X)} \cap V_i \to V_i$. 
A priori clear would be $U_i \to \overline{f_i(U_i)} \cap V_i \to V_i$ where $f_i = f|_{U_i}$. The map $U_i \to \overline{f(X)} \cap V_i \to V_i$ needs some thought. In essence you start with
$V_i$ then take all $U_{i\nu}$, open, affine with $f(U_{i\nu}) \subseteq V_i$, consider all associated $A_i \to B_{i\nu}$, take all their kernels $\ideal{a}_{i\nu}$ and form the intersection $\bigcap_\nu \ideal{a}_{i\nu} = \ideal{a}_i$. Then you have $V(\ideal{a}_i) = \overline{f(X)} \cap V_i$.
I hope this is now correct and serves you better.
