The Bolyai-Gerwien theorem states:
Given two polygons with the same area, it is possible to cut up one polygon into a finite number of smaller polygonal pieces and from those pieces assemble into the other polygon.
Then, most proofs I've seen go something like this:
One possible proof is to show that any polygon can be broken down into triangles. These triangles can be reassembled into rectangles, which can then be joined into one big rectangle. This big rectangle can then be reassembled into a square.
My question is: how does this prove the theorem? It is indeed true that we can turn some polygon $P$ into a square $S$ of the same area, and then cut $S$ into another set of pieces and reassemble them into some other polygon $P'$ of the same area. But how is the condition in the statement of the theorem that I've made bold really hold? Pieces used to reassemble $P$ into $S$ are not the same pieces used to reassemble $S$ into $P'$. What is going on here?