Solution (source code)

= Solution

Here $D^2$ must denote the <closed disc> $\{(x,y):x^2+y^2\leq1\}$, as its boundary points participate in the identification. For $r=\sqrt{x^2+y^2}$, define
$$
F(x,y)=\begin{cases}
\left(\dfrac{\sin(\pi r)}r x,\dfrac{\sin(\pi r)}r y,\cos(\pi r)\right),&r>0,\\
(0,0,1),&r=0.
\end{cases}
$$
The <Pythagorean trigonometric identity> gives $\|F(x,y)\|^2=1$, so the image lies in the <sphere> $S^2$. Away from the origin the formula is <continuous>. At the origin, the first two coordinates have absolute value at most $|\sin(\pi r)|\to0$ and the third tends to $1$, proving <continuity> there as well.

Every boundary point maps to $(0,0,-1)$, while the origin maps to $(0,0,1)$. For a point $(u,v,w)\in S^2$ with $-1<w<1$, there is a unique $r\in(0,1)$ with $\cos(\pi r)=w$, and its unique <preimage> is
$$
(x,y)=\frac{r}{\sin(\pi r)}(u,v).
$$
This point has radius $r$, because $u^2+v^2=1-w^2=\sin^2(\pi r)$. The two poles have the <preimages> already described. Thus $F$ is <surjective> and its <fibers> are exactly the prescribed <equivalence classes>.

The <closed disc> is <compact> by the <Heine-Borel theorem>, and $S^2$ is <Hausdorff> with the <subspace topology> from <Euclidean space>. The preceding result gives the <homeomorphism>
$$
\boxed{D^2/{\sim}\ \cong\ S^2,\qquad [x,y]\longmapsto F(x,y)}.
$$