That proof can also be done sort of backwards and is arguably easier that way. Instead of using three triangles of known dimensions and proving they can be assembled into a rectangle, start with the rectangle and find the dimensions of the triangles.
Angles and are congruent (alternate interior angles). So are and since both are complementary with . So triangles and are similar; the hypotenuses are in the ratio , so the vertical leg and the horizontal leg . Likewise we find (as it should be) and . But then implies or, multiplying though by , .
(Right away you know this proof fails in non Euclidean geometry, because in the first steps it relies on there being one and only one line parallel to through .)