Spaces with fundamental group isomorphic to a free group with $(n-1)$ generators I'm trying to solve the following question:
Let $X=A\cup B$ be an open cover of $X$ where $A,B$ are simply connected and $A\cap B$ consists of $n \ge 2$ path connected components.
I want to show that $\pi_1(X)$ is isomorphic to a free group with $(n-1)$ generators.
I tried to start with the case for $n=2$ But I failed..(someone even asked it here but the answer wasen't detailed enugth and I didn't understand it).
I want to solve it with rudimentary tools (without groupoids).
 A: I’m going to sketch roughly how I would try to prove this.
So we know we don’t have to think about these cases, observe that we must have $A\not\subset B$ nonempty and $B\not\subset A$ nonempty.
Let the connected components of $A\cap B$ be $C_1,\,C_2,\dots,C_n.$ Now pick a point $x\in A-B\subset X$ and we shall try to compute $\pi_1(X,x).$ As $A$ is simply connected, any path that does not meet $B-A$ must be path-homotopic to the point. Now pick a point $y\in B-A$ and pick points $z_i\in C_i\subset A\cap B$. Because $A,B$ are simply connected there are unique (up to path homotopy) paths $\gamma_i : x\rightsquigarrow z_i \rightsquigarrow y$
The object is then to show that every loop at $x$ in $X$ must be homotopic to a composition $\gamma_{i_1}\cdot\bar\gamma_{j_1}\cdots\gamma_{i_k}\cdot\bar\gamma_{j_k}.$ It would be nice if this was the same as the path going from $A$ to $C_{i_1}$ to $C_{j_1}$ and so on but that’s sadly not the case. I’m not really sure how I’d prove this step.
The second part (which should perhaps come first) is to show that no $\gamma_i$ can be homotopic to $\gamma_j$ for $i\ne j.$
The third part is to then observe that any path homotopic to a decomposition as above can also be decomposed uniquely as a composition of loops of the form $\delta_i =\gamma_i\cdot\bar\gamma_n$ for $i=1,\dots,n-1,$ that if $\delta_i$ is homotopic to $\delta_j$ then $i=j$ and that therefore all paths in $x_i$ are homotopic to a unique path generated by $\delta_i$ and so the fundamental group of $X$ is the free group on generators $\delta_1,\delta_2,\dots,\delta_{n-1}.$
I’m afraid that’s a bit messy and incomplete so sorry about that.
