I am trying to prove the following:
Let $\mathbb{R} P^2$ be the real projective plane, $a \in \mathbb{R} P^2$. How can I calculate then the fundamental group of $Y$, where
$Y = (\mathbb{R} P^2 \times \{ 0,1 \} )_{ / (a,0) \sim (a,1)}$.
Can I use $\mathbb{R} P^2 \cong \mathbb{Z} / \mathbb{Z} 2$ to find a presentation of $\pi_1 (Y)$?
Let $N$ be some contractible open neighborhood of $a$, and let $A = \mathbb{R} P^2 \times \{0\} \cup N \times \{1\}$, and $B = N \times \{0\} \cup \mathbb{R} P^2 \times \{1\}$. Clearly, the interiors of $A$ and $B$ cover $Y$, and each of $A$, $B$, $A \cap B$ are path connected. Then we may use Van Kampen.
Because $N$ was chosen to be contractible, $A$ deformation retracts to $\mathbb{R} P^2 \times \{0\}$, and $B$ deformation retracts to $\mathbb{R} P^2 \times \{1\}$, each of which has fundamental group $\mathbb{Z}_2$ (as you note).
By Van-Kampen, $\pi_1(Y,a)$ is isomorphic to $\mathbb{Z}_2 \ast \mathbb{Z}_2$ quotiented by some subgroup. This subgroup is generated by $(i_B)_\ast(\gamma)(i_B)_\ast(\gamma)^{-1})$, where $i_A$ is the inclusion of $A \cap B$ into A, and $i_B$ likewise.
However, by the same contractibility arguments as before, $A\cap B$ is simply connected, so the subgroup we are quotienting by is trivial, meaning $\pi_1(Y,a) \cong \mathbb{Z}_2 \ast \mathbb{Z}_2$, or if you prefer a presentation,
$$\langle x,y \mid x^2=y^2=e\rangle$$