This is a general nonsense fact.
Lemma:$$\require{AMScd}
\begin{CD}
0 @>>> A_n @>{i}>> B_n @>{j}>> C_n @>>> 0\\
{} @V{\alpha}VV @V{\beta}VV @V{\gamma}VV \\
0 @>>> A_n' @>{i'}>> B_n' @>{j'}>> C_n' @>>> 0
\end{CD}$$
$\{A_\bullet\}$, $\{B_\bullet\}$ and $\{C_\bullet\}$ be chain complexes and let there be short exact sequence $0 \to \{A_\bullet\} \to \{B_\bullet\} \to \{C_\bullet\} \to 0$ and $0 \to \{A'_\bullet\} \to \{B'_\bullet\} \to \{C'_\bullet\} \to 0$, and the above be a commutative diagram consisting of maps between the two short exact sequences. Then there is a commutative diagram
$$\require{AMScd}
\begin{CD}
H_n(\{C_\bullet\}) @>{\delta}>> H_{n-1}(\{A_\bullet\})\\
@V{\gamma_*}VV @V{\alpha_*}VV \\
H_{n}(\{C_\bullet'\}) @>{\delta'}>> H_n(\{A_\bullet'\})
\end{CD}$$
here $\delta, \delta'$ are the snake maps in the long exact sequence of the corresponding sequences.
Proof: Diagram-chase. Note that the snake map $\partial : H_n(\{C_\bullet\}) \to H_{n-1}(\{A_\bullet\})$ is defined by $\partial([c]) = [a]$ where $c = j(b)$ and $\partial_n(b) = i(a)$ where $\partial_n : B_n \to B_{n-1}$ is the boundary map in $\{B_\bullet\}$. Note that $\gamma(c) = \gamma (j(b)) = j'(\beta(b))$ and $i'(\alpha(a)) = \beta (i(a) ) = \beta (\partial(b)) = \partial(\beta(b))$. Thus, $\delta'([\gamma(c)]) = [\alpha(a)]$. That said, $\alpha_* \delta([c]) = \alpha_*([a]) = \delta'\gamma_*([c])$, hence the diagram commutes, as desired $\blacksquare$
Use this lemma to the short exact sequences $$0 \to \{C_\bullet(X_1 \cap X_2) \to \{C_\bullet(X_1) \oplus C_\bullet(X_2)\} \to \{C_\bullet(X)\} \to 0 \\ \text{and} \\ 0 \to \{C_\bullet(Y_1 \cap Y_2)\} \to \{C_\bullet(Y_1) \oplus C_\bullet(Y_2)\} \to \{C_\bullet(Y)\} \to 0$$ and the maps between the two short exact sequences induced from $f : X \to Y$ to settle the problem.