The interesting thing about these gluing arguments is that they are simultaneously intuitive and rigorous. To make them rigorous, to describe the homeomorphisms explicitly, you use quotient maps. Here's how to do it for your question.
Start with the 2--1 covering map
$$p : S^2 \to \mathbb{R} P^2
$$
which is a quotient map having the property that $p(x)=p(y) \iff x = \pm y$.
Using spherical coordinates on $S^2$ with $\phi$ being latitudinal angle measurement from the north pole $(0,0,1)$, decompose
$$S^2 = D_+ \cup C \cup D_-
$$
where $D_+$ is the northern polar cap defined by $0 \le \phi \le \pi/4$, $D_-$ is the southern polar cap defined by $3\pi/4 \le \phi \le \pi$, and $C$ is the equatorial strip defined by $\pi/4 \le \phi \le 3 \pi/4$. The set $D_+ \cup D_-$ is saturated with respect to $p$, and the restriction $p \mid D_+ \cup D_-$ is a 2--1 covering map over a subset $B \subset \mathbb{R} P^2$ homeomorphic to a disc. The set $C$ is also saturated, and the restriction $p \mid C$ is a 2--1 covering map over a subset $A$ of $\mathbb{R} P^2$ homeomorphic to the Mobius band. Note that the intersection of $\partial C$ and $\partial(D_+ \cup D_-)$ is two circles, and the restriction of $p$ to those circles is a double covering map over a single circle which is equal to both $\partial A$ and $\partial B$. It follows that $\mathbb{R} P^2$ is homeomorphic to the quotient of $A$ and $B$ by identifying their boundaries via a homeomorphism of circles.
The tools needed to fill in some of the rigorous details are various theorems such as can be found for example in Munkres topology, for example: gluing theorems of continuous maps; theorems about induced quotient maps; and theorems characterizing homeomorphisms.