I’m trying to calculate $\pi_1(\mathbb{R}P^2)$ using Van Kampen’s theorem. After choosing the two open sets (which I call $U$ and $V$) according to my lecture notes, I get $$\pi_1(\mathbb{R}P^2)=\pi_1(S^1)*_{\pi_1(S^1)}\pi_1(D^2)=\mathbb{Z}*_{\mathbb{Z}}\{e\}$$
I know this has to give $\mathbb{Z}_2$ as a result, but I’m not sure how to apply the definition of the amalgamated product in order to find this (the definition is still a bit obscure for me, as I just learnt about it). I think I should take a generator of $\mathbb{Z}$ and look at its images by the induced homomorphisms $(i_1)_*$ and $(i_2)_*$, where $i_1:U \cap V \rightarrow U$ and $i_2:U \cap V \rightarrow V$ are the inclusions, and find something like the condition $\langle b \mid b^2=1 \rangle$, but I don’t see exactly how to do that.
Could someone please guide me through the steps?