A homotopy equivalence between spaces $B\Gamma$ and $K\Gamma$ for a graph of groups on a graph $\Gamma$ In Hatcher's "Algebraic Topology" (p. 92), the space $B\Gamma$ (for a graph of groups on a graph $\Gamma$) is defined to be a collection of spaces $BG_v$ for each vertex $v$, which are connected by certain mapping cylinders corresponding to the edge morphisms. If we replace $BG_v$ with any $K(G_v,1)$ space in the construction, call the resulting space $K\Gamma$. Then there is a comment:
"We leave it to the reader to check that the resulting space $K\Gamma$ is homotopy equivalent to the space $B\Gamma$ constructed above."
My question is: how does one prove this?
What I've got:
I can't seem to extend the homotopy equivalences $BG_v\to K(G_v,1)$ to a homotopy equivalence of the entire network of mapping cylinders. I suppose it's enough to do it for the case of only one edge as long as the two homotopies that govern the homotopy equivalence are constant on both sides of the two mapping cylinders.
Given a group morphism $G_v\to G_w$, I can see that the following diagram commutes upto homotopy:
$BG_v\longrightarrow BG_w$
$\downarrow\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\; \downarrow$
$K(G_v,1)\to K(G_w,1)$
since the two compositions of maps induce the same map $\pi_1(BG_v)\to\pi_1(K(G_w,1))$. (See Proposition 1B.9 on page 90). But I don't know where to go from there.
Update: What I'm looking for is Hatcher's intended solution, which probably involves explicitly contructing a homotopy equivalence.
The question boils down to this. Suppose we have a commutative diagram
$\;\;\;\;\;f_1$
$A\longrightarrow B$
$\downarrow f\;\;\;\;\;\;\;\;\downarrow g$
$C\longrightarrow D$
$\;\;\;\;\;f_2$
where $f$ and $g$ are homotopy equivalences, $f^{-1}$ and $g^{-1}$ are their homotopy inverses. Suppose also that the diagram is homotopy commutative and so is the diagram with the homotopy inverses. Let $M_1$ be the mapping cylinder for $f_1$ and $M_2$ be the mapping cylinder for $f_2$.
Suppose we have the following homotopies:


* $H_1:A\times I\to D$, a homotopy $f_2 f \simeq g f_1$

* $H_2:C\times I\to B$, a homotopy $f_1 f^{-1} \simeq g^{-1}f_2$

* $H_f:A\times I\to A$, a homotopy $f^{-1}f\simeq 1_A$

* $H_g:B\times I\to B$, a homotopy $g^{-1}g\simeq 1_B$


Define $F:M_1\to M_2$ to be:


* $(f(a),2t)$ for $(a,t)\in A\times [0,\frac{1}{2}]$

* $H_1(a,2t-1)$ for $(a,t)\in A\times [\frac{1}{2}.1]$

* $g(b)$ for $b\in B$


Define $G:M_2\to M_1$ to be:


* $(f^{-1}(c),2t)$ for $(c,t)\in C\times [0,\frac{1}{2}]$
* $H_2(c,2t-1)$ for $(c,t)\in C\times [\frac{1}{2},1]$

* $g^{-1}(d)$ for $d\in D$


We want to show that $GF\simeq 1$ using a homotopy that extends both $H_f$ and $H_g$


My attempt:
Computing $GF$ gives:


*$(f^{-1}f(a),4t)$ for $(a,t)\in A\times[0,\frac{1}{4}]$

* $H_2(f(a),4t-1)$ for $(a,t)\in A\times[\frac{1}{4},\frac{1}{2}]$

* $g^{-1}(H_1(a,2t-1))$ for $(a,t)\in A\times[\frac{1}{2},1]$

* $g^{-1}g(b)$ for $b\in B$


We can partially define $H:M_1\times I\to M_1$ as follows:


* $(H_f(a,s),4(1-s)t+st)$ for $(a,t,s)\in A\times [0,\frac{1}{4}]\times I$

* For $(a,t,s)\in A\times [\frac{1}{4},\frac{1}{2}]\times I$ as follows:


* $H_2(f(a), \frac{1-4t}{2t-\frac{1}{2}}s + 4t-1)$ for $s\leq 2t-\frac{1}{2}$

* $(H_f(a, \frac{s-(2t-\frac{1}{2})}{1-(2t-\frac{1}{2})}), t + \frac{(t-1)s-(t-1)}{1-(2t-\frac{1}{2})})$ for $s\geq 2t-\frac{1}{2}$


So what I need is a function $H:A\times[\frac{1}{2},1]\times I\to M_1$ that satisfies the following boundary conditions:


* Agrees with the already defined $H$ on $A\times\{\frac{1}{2}\}\times I$

* Is equal to $g^{-1}(H_1(a,2t-1))$ on $A\times[\frac{1}{2},1]\times\{0\}$

* Is equal to $(a,t)$ on $A\times[\frac{1}{2},1]\times\{1\}$

* Is equal to $H_g(f_1(a),s)$ on $A\times \{1\}\times I$
 A: You are on the right track, I believe.
You want to show that a homotopy commutative diagram
$$
\begin{array}{ccc}
X_1&\to&Y_1\\
\downarrow\psi & &\downarrow\phi\\
X_2&\to&Y_2.
\end{array}
$$
extends to a (strictly) commutative diagram
$$
\begin{array}{ccccc}
X_1&\to&\operatorname{Cyl}(f_1)&\gets&Y_1\\
\downarrow& &\downarrow\pi&&\downarrow\\
X_2&\to&\operatorname{Cyl}(f_2)&\gets&Y_2.
\end{array}
$$
Let $F\colon X_1\times I\to Y_2$ be the homotopy from the first diagram. Just define $\pi$ to be


*

*$\psi\times(t\mapsto 2t)$ on $X_1\times[0;1/2]\subset\operatorname{Cyl}(f_1)$; 

*$F$ on $X_1\times [1/2;1)\subset\operatorname{Cyl}(f_1)$;

*$\phi$ on $Y_1\subset\operatorname{Cyl}(f_1)$.


Applying this lemma to each edge yields a map $f\colon B\Gamma\to K\Gamma$.

Let's show that $f$ indeed is a homotopy equivalence. Proving homotopy equivalence directly is usually hard, so let's apply algebraic methods instead.
Denote by $V_1\subset B\Gamma$ (resp. $V_2\subset K\Gamma$) the (disjoint) union of spaces in vertices. Observe that both $B\Gamma/V_1$ and $K\Gamma/V_2$ are of the same homotopy type $$
E:=\bigcup_{\text{edge}\in\Gamma}\Sigma K(G_{\operatorname{source}(\text{edge})},1)\cong\Gamma\vee\bigvee_{\text{edge}\in\Gamma}\Sigma K(G_{\operatorname{source}(\text{edge})},1).
$$
Now pretend for a moment that fundamental groups of all spaces are abelian. Then it's enough to show that $f$ induces isomorphism in homology. But it follows immediately from applying the 5-lemma to homology long exact sequences of pairs $(B\Gamma,V_1)$ and $(K\Gamma,V_2)$: 
$$
\begin{array}{ccccccccc}
H_{i+1}(E_1)&\to&H_i(V_1)&\to&H_i(B\Gamma)&\to&H_i(E_1)&\to&H_{i-1}(V_1)\\
\wr|        &   &\wr|    &  &\downarrow f_*&  &\wr|    &   & \wr|\\
H_{i+1}(E_2)&\to&H_i(V_2)&\to&H_i(K\Gamma)&\to&H_i(E_2)&\to&H_{i-1}(V_2).
\end{array}
$$
Now our spaces may have non-trivial fundamental groups, but showing that $f$ induces isomorphism in homology is still enough if one uses homology with coefficients in local systems (oh, one needs to show first that fundamental groups are isomorphic — that can be done by Seifert-van Kampen). So actually we're done.
(Morale of the story: applying 5-lemma to homology long exact sequence allows to prove things like «if $a_1\cong a_2$ and $b_1\cong b_2$, then $a_1+b_1\cong a_2+b_2$» for weak homotopy types, given there is one map inducing both weak equivalences.)
