Serre's Trees Exercise 1.2 I'm having some confusion over Serre's Trees section on Amalgam. 

Let $A = \mathbb{Z}$, $G_1 = PSL(2, \mathbb{Q})$ and $G_2 = \mathbb{Z}/2\mathbb{Z}$. We take $f_1: A \to G_1$ and $f_2: A \to G_2$ to be a surjection. Show that $G_1 \ast_{A} G_2 = \{1\}$. 

In the text, we haven't formally constructively define what it means to have an amalgam over $A$. 
So are we simply take the  disjoint union of generators of $A, G_1$ and $G_2$ and mod out the relations? 
The relations I got is simply identifying all the even numbers with $0$ in $G_2$, identifying all $n \in \mathbb{Z}$ with the matrix 
$$ \begin{bmatrix} 1 & n \\ 0 & 1 \end{bmatrix}.$$ 
But since $\mathbb{Q}$ has infinitely many generators, I'm not sure why we can reduce this group to a trivial one. 
Any help is appeciated! 
 A: Have you done exercise 1.1? I'll quote it for convenience:

Let $f_1 : A \to G_1$ and $f_2 : A \to G_2$ be two homomorphisms  and let $G_1 *_A G_2$ be the corresponding amalgam. We define subgroups of $A^n$, $G_1^n$ and $G_2^n$ of $A$, $G_1$ and $G_2$ recursively by the following conditions:
$$
A^1  = \{1 \}, \ \ \ \ G_1^n = \{1\}, \ \ \ \ G_2^1 = \{1\}
$$
$$
A^n = \text{subgroup of $A$ generated by} \ f_1^{-1}(G_1^{n-1}) \ \text{and} \ f_2^{-1}(G_2^{n-1})
$$
$$
G_i^n = \text{subgroup of $G_i$ generated by $f_i(A^n)$}.
$$
Let $A^\infty$, $G_i^\infty$ be the union of the $A^n$, $G_i^n$ respectively. Show that $f_i$ defines an injection $A/A^\infty \to G_i/G_i^\infty$ and that $G$ may be identified with the amalgam of $G_1/G_1^\infty$ and $G_2/G_2^\infty$ along $A/A^\infty$.

I should say that I think we need to assume that $G_i^n$ is the normal subgroup generated by $f_i(A^n)$ in order to guarantee that the $G_i^\infty$ are normal subgroups (anyways, $f_i(A^n)$ is already a subgroup, so it would be strange to talk about the subgroup it generates).
In view of this exercise, it suffices to show that $A = A^\infty$ and $G_i = G_i^\infty$ in our current example. It is very easy to show that $G_1^2 = (\mathrm{PSL}(2,\mathbb{Q}))^2$ is non-trivial. Since $\mathrm{PSL}(2,\mathbb{Q})$ is a simple group, we must have that $G_1^\infty = G_1^2 = G_1$. The desired result then follows very quickly using the recursive formulas defining $A^n$ and $G_i^n$. By the result of the exercise $G_1 *_A G_2$ is isomorphic to the amalgam of trivial groups over a trivial groups, which is of course trivial.
