Euclid Book I proposition 47 (The Pythagorean Theorem)

Drag Point B and C to make the triangle larger or smaller. Drag Point A to change where the right angle is.
Check the first checkbox and explain why those two triangles are congruent.
How does the fact that the triangles are congruent lead to the blue square having the same area as the blue rectangle?
Uncheck the first checkbox and check the second checkbox and explain why those two triangles are congruent.
How does the fact that the triangles are congruent lead to the red square having the same area as the red rectangle?
How does this prove the Pythagorean Theorem?