Theorem. Let $X$ be the union of two path-connected open sets $A$ and $B$ and assume that $A\cap B\neq \emptyset$ is simply-connected. Let $x_0$ be a point in $A\cap B$ and all fundamental groups will be written with respect to this base point. Let $\Phi:\pi_1(A)\sqcup \pi_1(B)\to \pi_1(X)$ be the natural homomorphism induced from the maps $\pi_1(A), \pi_1(B)\to \pi_1(X)$ (Here '$\sqcup$' denotes the free product). Then $\Phi$ is and isomorphism.
(The above theorem is given in more general form in Hatcher's Algebraic Topology, but for me the above special case suffices.)
I can see that $\Phi$ is surjective. So we need to address the injectivity of $\Phi$.
Write $G=\pi_1(A)\sqcup \pi_1(B)$. Suppose $\gamma$ is a loop in $A$ based at $x_0$. Think of $[\gamma]$ as member of $G$. Assume that $\Phi([\gamma])$ has the trivial homotopy class in $X$. In order for $\Phi$ to be injective, it is necessary that $[\gamma]$ be the identity element of $G$.
My question is whether or not the following statement is correct:
Statement. $[\gamma]$ is the identity element of $G$ if and only if $\gamma$ has trivial homotopy class in $\pi_1(A)$.
Please check my last statement. For if the above is wrong then it would mean I have to go back to free products.)