This is just a problem solving question.
Let $G$ be a finitely generated group such that $G=A*_CB$ where $|A:C|=|B:C|=2$ and $A,B$ are finite. Show that $G$ has a finite index subgroup isomorphic to $\mathbb{Z}$.
(I tried to solve problems in my study note. But, for above one, I couldn't catch the start point. Anyone gives a small hint would be very helpful to me.)
Inspiration: in the free product $H=C_2*C_2=\langle a,b|a^2,b^2\rangle$ the element $ab$ has infinite order. And furthermore the only nontrivial coset of $\langle ab\rangle$ is $b\langle ab\rangle$ (every word in $H$ is either a product of $ab$s or it is $b$ followed by a product of $ab$s), so $\langle ab\rangle$ has index two.
The given information in this problem tells us $A=C\sqcup aC$ and $B=C\sqcup bC$ with the additional tidbits that $aC=Ca$ and $bC=Cb$. We may conclude $G=A*_CB$ is generated $a,b,C$ in $G$.
Consider the element $ab$ in $G$. It has infinite order, so it generates a cyclic group - what is the resulting index? Split into two indices, $G:\langle ab,C\rangle:\langle ab\rangle$. Note that $A,B$ finite $\Rightarrow C$ finite.
To compute $[\langle a,b,C\rangle:\langle ab,C\rangle]$, "mod out $C$" and take $[\langle a,b\rangle:\langle ab\rangle]=2$ (back in our $H=C_2*C_2$) as inspiration, and to compute $[\langle ab,C\rangle:\langle ab\rangle]$, "mod out $ab$."