$X$ is Hausdorff and locally arcwise connected, $X=A\cup B$, where $A$ and $B$ are closed subspaces of $X$, $A\cap B =\{ p\}$ and $p$ has open contractible neighborhoods $U,V$ in $A,B$ respectively. Show $\pi_1(X,p) \cong \pi_1(A,p)*\pi_1(B,p)$.
I am at a loss as to how to solve this.
Seifert-van Kampen theorem sounded okay but $A,B$ are closed and not open, so I can't use the theorem. $U,V$ are open and their intersection is simply connected but $\pi_1(U,p)$ and $\pi_1(V,p)$ are each the trivial group as they are contractible spaces. I was hoping to somehow apply Seifert-van Kampen and somehow extend this so that it covers for $X$.