Deriving the formula of the surface of a sphere using triangles.

My friend tried to find the formula of the surface of a sphere using the following reasoning, but we can't see the mistake:

Let's first take half a sphere and divide the sphere into infinitely small triangles like this: Bad drawing, but I hope you understand the idea.

Then, we can unwrap it and arrange the hemisphere into half a rectangle: The height will be $$\frac{\pi r}{2}$$ because it is a quarter of the length of a circumference and the base will be $$2 \pi r$$.

We can now insert the other half rectangle of the other hemisphere divided in infinitely small triangles in this way: It will nicely create a rectangle (if we rearrange the side triangles) and to get the area of the rectangle, just multiply the base times height, ending with $$\pi^2 r^2$$. We know that that the correct answer is $$4 \pi r^2$$, but we can't figure out the error.

At the most abstract level, the discrepancy is due to the sphere not being a developable surface: it cannot be projected onto a plane while preserving areas and angles at once. Thus, it is not correct to say that the triangle on the unit sphere with angles $$\frac\pi2$$, $$\frac\pi2$$ and $$dx$$ – the "infinitely small triangles" in the argument – has the same area as the planar right triangle of leg lengths $$dx$$ and $$\frac\pi2$$.