The figure below contains a square and two congruent right triangles.
![](https://cdn.mathpix.com/cropped/2024_05_01_27f67f4520ebb8354fb2g-15.jpg?height=230&width=586&top_left_y=1532&top_left_x=837)

Using these polygons, we form a rectangle and a trapezoid as shown in the following figure:
![](https://cdn.mathpix.com/cropped/2024_05_01_27f67f4520ebb8354fb2g-15.jpg?height=226&width=798&top_left_y=1953&top_left_x=731)

Knowing that the perimeter of the rectangle is 58, and that the perimeter of the trapezoid is 60, calculate the side of the square.

Note: A triangle is said to be right if one of its angles measures $90^{\circ}$. Two triangles are said to be congruent when both have sides of the same lengths.

#
Solution

It is clear from the figure in the statement of this exercise that the length of the side of the square must coincide with the length of one of the legs of the triangles. Let's call this length $a$. In addition, let's call the length of the hypotenuse $b$ and the length of the other leg $x$. From the figure below, we see that the perimeter of the trapezoid is given by $2a + 2b + 2x$.

![](https://cdn.mathpix.com/cropped/2024_05_01_27f67f4520ebb8354fb2g-44.jpg?height=297&width=819&top_left_y=928&top_left_x=527)

Therefore, for the perimeter of the trapezoid to be equal to 60, the following equation must be satisfied:

$$
2a + 2b + 2x = 60
$$

From this, we conclude that

$$
x = \frac{60 - 2a - 2b}{2} = 30 - a - b
$$

Note that the perimeter of the rectangle is given by $4a + 2x$, as we can observe below.

![](https://cdn.mathpix.com/cropped/2024_05_01_27f67f4520ebb8354fb2g-44.jpg?height=297&width=394&top_left_y=1713&top_left_x=731)

Thus, using the expression for $x$ obtained above, we get that this perimeter is equal to:

$$
2(30 - a - b) + 4a
$$

which must coincide with 58 according to the problem statement. Therefore, the following equation must be satisfied:

$$
2(30 - a - b) + 4a = 58
$$

Simplifying the equation above, we get $b = a + 1$. Substituting this expression for $b$ into the expression $x = 30 - a - b$, we obtain $x = 29 - 2a$.

Thus, the lengths of the legs of each triangle are $a$ and $29 - 2a$, while the length of the hypotenuse is $b = a + 1$, as illustrated in the figure below:

![](https://cdn.mathpix.com/cropped/2024_05_01_27f67f4520ebb8354fb2g-45.jpg?height=305&width=220&top_left_y=236&top_left_x=1021)

Using the Pythagorean Theorem, we have the equation

$$
a^2 + (29 - 2a)^2 = (a + 1)^2
$$

Simplifying the equation above, we get that $a$ satisfies

$$
4a^2 - 118a + 840 = 0
$$

Factoring the polynomial in $a$ on the left side, we can rewrite the equation above as

$$
2(a - 12)(2a - 35) = 0
$$

Thus, we obtain the solutions of the quadratic equation as the numbers 12 and 35/2. But if $a$ were equal to $35 / 2$, the length $x = 29 - 2a$ would be negative. Therefore, the only valid solution is $a = 12$.

#