My question is about the computation the fundamental group of graph of groups:
First let me give a reference for my question:
In the page 14 of Groups acting on graphs by Dunwoody and Dicks.
It says that
The fundamental group of graphs of groups can be obtained by successively performing one free product with amalgamation for each edge in the maximal subtree and then one HNN extension for each edge not in the maximal subtree.
I cannot see this procedure in the following example.
Suppose that our graph $Y$ is the complete graph with three vertices $K_3$ and the vertex groups are $A,B,C$ and the edge groups are $E,F,D$.
The trick is that at each step of the procedure, the group computed in the previous step is treated as a single vertex group in the next step.
So, for example, in the left-most diagram $1-2-3$, one first computes the fundamental group of the one-edge subgraph $1-2$, which is $A*_EB$. That becomes a single vertex group in the middle diagram, the other vertex group being $C$ which is the group label on the original vertex 3, and the edge group being $F$ which is the group labelling the original edge $2-3$. The edge-to-vertex homomorphism $F \to A*_EB$ in the middle diagram is defined to be the composition $$F \mapsto B \mapsto A*_EB $$
One way to think of what has happened from the left diagram to the middle diagram is that the $1-2$ edge in the left diagram has been collapsed to form a vertex in the middle diagram, not that the edge has been removed in any way as your comment suggests.