Two squares, $A B C D$ with an area of $30 \mathrm{~cm}^{2}$ and $F H I J$ with an area of $20 \mathrm{~cm}^{2}$, have their sides $A D$ and $H I$ on a line, as shown in the figure. If the point $E$ on the segment $A H$ is such that $B E F G$ is a square, calculate the area of this square.

![](https://cdn.mathpix.com/cropped/2024_05_01_30c9a294a58a6e4b8190g-027.jpg?height=417&width=711&top_left_y=505&top_left_x=752)
The right triangles $\triangle A E B$ and $\triangle E H F$ are congruent, as their angles $E \widehat{B} A$ and $F \widehat{E} H$ are equal (sides are perpendicular) and the hypotenuses are equal (sides of a square). Therefore, $A E=F H$. By the Pythagorean Theorem,

$$
\text { area of } B E F G=B E^{2}=A B^{2}+A E^{2}=A B^{2}+F H^{2}=30+20=50 \mathrm{~cm}^{2}
$$