Setup:
Let $X = \mathbb{R} P^2 \times \left\lbrace 0, 1\right\rbrace/(p,0) \sim (p,1)$ with $p \in \mathbb{R} P^2$.
Compute the fundamental group of $X$.
My solution First, we have that $X$ is path-connected since it is the image of the canonical projection of two path-connected space with one identified point.
Therefore, the fundamental group of $X$ is independant of the choice of base point $x_0$.
We take $x_0 =[(p,0)]$.
Now, we use the Van Kampen theorem:
Let $A = (B_r(p) \cup B_r(-p)) \cap S^2 \in S^2$.
Then, $\pi(A) = B_r(p)\cap \mathbb{R}P^2$ in $\mathbb{R} P^2$ with $p \in \pi(A)$ (with $\pi: S^2 \to \mathbb{R} P^2$).
Let us call that subspace $B$
Now we consider $\pi: \mathbb{R} P^2 \times \left\lbrace 0, 1\right\rbrace \to X$ and let $$U = \pi((\mathbb{R} P^2 \times \left\lbrace 0\right\rbrace \cup( B \times \left\lbrace 1\right\rbrace))$$ $$V = \pi((B \times\left\lbrace 0\right\rbrace )\cup( \mathbb{R} P^2 \times \left\lbrace 1\right\rbrace)$$ First, $U$ and $V$ are open by construction. Also, $U$ and $V$ path-connected.
We have that $B \approx B_{1}(0) \subset \mathbb{R}^2$ the open ball and $\mathbb{R} P^2 \times \left\lbrace i\right\rbrace$ is path-connected being a product of path-connected spaces. For any pair of points separated in the domain, call them $(x,0)$ and $(y,1)$ we can define paths $$\gamma_1:(x,0)\to (p,0)$$ $$\gamma_2:(p,1) \to (y,1)$$ and concatenante them (since $(p,0) \sim (p,1)$) so that they are connected by a path in $X$.
We also have that $U \cap V$ is path connected by the same reasonning.
Hence, we can apply the Van Kampen theorem with those subspace.
From here, I'm not sure how to proceed
I would like to show that $U \cap B =\pi( B \times \left\lbrace 0,1) \right\rbrace \simeq \left\lbrace p \right\rbrace$
Ideally, I would show that if $B\times \left\lbrace i \right\rbrace$ can be retracted to a point and then I would have \begin{align*} \pi_1(U, p) = \pi_1(\mathbb{R}P_2, p) = \mathbb{Z}_2\\ \pi_1(V,p) = \pi_1(\mathbb{R}P_2, p) = \mathbb{Z}_2\\ \pi_1(U \cap V, p) = \pi_1(point) = \left\langle 1 \right\rangle \end{align*} and therefore \begin{align*} \pi(X, p) &= \left\langle a,b | a^2 = b^2 = 1\right\rangle\\ &\cong \mathbb{Z}_2 \times \mathbb{Z}_2 \end{align*} But I can't seem to find a way to show that I can retract the set $B$ into the point.
Any help on how to proceed would be appreciated!
Thanks in advance!
PS: I am sorry if my solution attempt is a bit confusing, English is not my first language and I'm new to that kind of proof!
@AndresMeija’s answer points out the one error in your question. On the other hand, regarding the one gap that you mention, showing that $U \cap V$ retracts to a point: follow the following steps: