Infinite and non-abelian fundamental group $\require{AMScd}$
I ran into trouble while trying to answer this question. I am trying to prove the following:

Suppose $U_1,U_2$ and $U_3 := U_1 \cap U_2$ are open, path-connected subsets of $X = U_1 \cup U_2$. Suppose that $\pi_1(U_1) \cong \mathbb{Z}/3$, $\pi_1(U_2) \cong \mathbb{Z}/4$ and $\pi_1(U_3) \cong \mathbb{Z}/2$. Show that $\pi_1(X)$ is infinite and non-abelian.

Using van Kampen, we get the following commutative diagram:
\begin{CD}
\mathbb{Z}/2 @>\varphi_1>> \mathbb{Z}/3\\
@V\varphi_2VV  @VV\psi_1V  \\
\mathbb{Z}/4 @>\psi_2>> \pi_1(X) 
\end{CD}
Here, $\varphi_1,\varphi_2,\psi_1,\psi_2$ are the homomorphisms induced by the canonical inclusions $U_3 \hookrightarrow U_1$, $U_3 \hookrightarrow U_2$, $U_1 \hookrightarrow X$ and $U_2 \hookrightarrow X$ respectively. Now, since
$$
\# \text{Hom}_\mathbb{Z}(\mathbb{Z}/2,\mathbb{Z}/3) = \gcd(2,3) = 1,
$$
we must have that $\varphi_1 = 0$ is the zero map. Since the diagram commutes, we also get $\psi_2 \circ \varphi_2 = 0$. Using group presentation, we can write $\pi_1(U_1) \cong \langle \alpha \mid \alpha^3\rangle$, $\pi_1(U_2) \cong \langle \beta \mid \beta^4\rangle$ and $\pi_1(U_3) \cong \langle \gamma \mid \gamma^2\rangle$. Again by van Kampen, we get
\begin{align}
\pi_1(X) \cong (\mathbb{Z}/3) *_{\mathbb{Z}/2} (\mathbb{Z}/4) \cong \left\langle \alpha, \beta \mid \alpha^3,\; \beta^4,\; 0=\varphi_2(\gamma)\right\rangle.
\end{align}
My problem is that I'm not sure how to continue. Can we say anything about the map $\varphi_2$? Since $\# \text{Hom}_\mathbb{Z}(\mathbb{Z}/2,\mathbb{Z}/4) = \gcd(2,4)=2$ there are two possibilities for $\varphi_2$. One is the zero map again, and the other is the map $0 \mapsto 0$ and $1\mapsto 2$. In the case that $\varphi_2$ is indeed the zero map, the claim follows immediately. Is there something that we can infer from $\psi_2 \circ \varphi_2=0$?
 A: The last relation $\phi_2 (\gamma) = 0$ is either $\beta^2 = 0$ or $\beta^0 = 0$ (the last of which is trivial so doesn't add any information)
This implies that $\pi_1(X) = \langle\alpha, \beta \mid \alpha^3, \beta^n \rangle$ where $n = 2$ or $4$. This is the case since $\langle\alpha, \beta \mid \alpha^3, \beta^2 \rangle =\langle\alpha, \beta \mid \alpha^3, \beta^4, \beta^2 \rangle$.
This means that in either case $\pi_1(X)$ is a free product of two nonzero groups ($\mathbb Z_3 * \mathbb Z_4$ or $\mathbb Z_3 * \mathbb Z_2$) which is always infinite and non-abelian.
A: I will write multiplicatively the operation in all involved groups. So the diagram:
\begin{CD}
\mathbb{Z}/2 @>\varphi_1>> \mathbb{Z}/3\\
@V\varphi_2VV  @VV\psi_1V  \\
\mathbb{Z}/4 @>\psi_2>> \pi_1(X) 
\end{CD}
is
\begin{CD}
\langle \ \gamma\  |\ \gamma^2 =1\ \rangle @>\varphi_1>> 
\langle \ \alpha\  |\ \alpha^3 =1\ \rangle
\\
@V\varphi_2VV  @VVV  
\\
\langle \ \beta\  |\ \beta^4 =1\ \rangle @>>> 
\pi_1(X) 
\end{CD}
and by van Kampen $\pi_1(X)$ is the group with the generators and relations copied from (the multiplicative versions of) $\Bbb Z/4$ and $\Bbb Z/3$, amalgamated w.r.t. $\varphi_1(\gamma)=\varphi_2(\gamma)$. Of course, $\varphi_1(\gamma)=1$. For $\varphi_2(\gamma)$ we have two chances, either $1$ or $\beta^2$. So the chances for $\pi_1(X)$ are either
$$
\begin{aligned}
\pi_1(X) 
&=\langle \ \alpha,\beta\ |\ \alpha^3=1\ ,\ \beta^4=1\ ;\ 1=1\ \rangle
\\
&=\langle \ \alpha,\beta\ |\ \alpha^3=1\ ,\ \beta^4=1\ \rangle
\ ,
\\[3mm]
&\qquad\text{ or }
\\[3mm]
\pi_1(X) 
&=\langle \ \alpha,\beta\ |\ \alpha^3=1\ ,\ \beta^4=1\ ;\ \beta^2=1\ \rangle
\\
&=\langle \ \alpha,\beta\ |\ \alpha^3=1\ ,\ \beta^2=1\ \rangle
\ .
\end{aligned}
$$
Two infinite groups with above presentations.
