Let $f:X \rightarrow Y$ be a map between simplicial complexes. Let $C$ and $C'$ be subcomplexes of $Y$ such that $Y = C \cup C'$. Define $D = f^{-1}(C)$ and $D'=f^{-1}(C')$, so $D \cap D' = f^{-1}(C \cap C')$. For some $n \geq 0$, assume that $f$ restricts to $n$-homotopy equivalences $D \rightarrow C$ and $D' \rightarrow C'$ and $D \cap D' \rightarrow C \cap C'$. Question: must $f$ be an $n$-homotopy equivalence? I assume that the answer is "yes", but it would be great to have a citable reference.

Using Mayer-Vietoris, one can show that $f$ induces isomorphisms on homology up to degree $n$. Moreover, using Seifert-van Kampen, one can show that $f$ induces an isomorphism on $\pi_1$ if $n \geq 1$. So the result is true if either $X$ or $Y$ is simply-connected.