I know what fundamental group of graph of groups with respect to a vertex P or a maximal subtree T is. However, when it comes to finding it as group of isometries (functions), I do not know how to find such a group and that is why I want to seek help on how to solve this problem. I truly appreciate any help.
Question: Let $f:\mathbb{R}\to \mathbb{R}$, $f(t)=-t$ be the reflection about the origin, and $g:\mathbb{R}\to \mathbb{R}$, $g(t)=2-t$ the reflection about $x=1$. Let $G$ be the group of isometries of $\mathbb{R}$ generated by $f$ and $g$. Realize $G$ as the fundamental group of a nontrivial graph of groups (no vertex group is isomorphic to G).
The first thing to notice is that this group is not only a group of isometries, but if you pick the correct graph structure on $\mathbb R$ then at the same time this group preserves the graph structure. Namely, choose the graph structure whose vertex set is $\mathbb Z \subset \mathbb R$.
Now take the quotient graph $\Gamma$. If you notice that the subgraph $[0,1]$ is a fundamental domain, and that $0$ and $1$ are in different orbits, and that there is no vertex between $0$ and $1$, then you are able to deduce that $\Gamma$ is a graph with two vertices $v_0,v_1$ connected by one edge $e$, and that the quotient map $q : \mathbb R \to \Gamma$ restricts to a graph isomorphism $[0,1] \to \Gamma$ that maps $0 \mapsto v_0$ and $1 \mapsto v_1$ and $[0,1] \mapsto e$.
So, what remains is to figure out how to give $\Gamma$ the correct graph of groups structure: the vertex group $\Gamma_{v_0}$ is the subgroup of $G$ that stabilizes $0$, which is the order 2 reflection group generated by $f$; the vertex group $\Gamma_{v_1}$ is the subgroup of $G$ that stabilizes $1$, which is the order 2 reflection group generated by $g$; and the edge group $\Gamma_e$ is the subgroup of $G$ that stabilizes $[0,1]$, which is the trivial group. Since the edge group $\Gamma_e$ is trivial, the edge-to-vertex group homomorphisms $\Gamma_e \mapsto \Gamma_{v_0}$ and $\Gamma_e \mapsto \Gamma_{v_1}$ must be trivial homomorphisms, and you are done.