Problem 7.5. A rectangle was cut into nine squares, as shown in the figure. The lengths of the sides of the rectangle and all the squares are integers. What is the smallest value that the perimeter of the rectangle can take?

![](https://cdn.mathpix.com/cropped/2024_05_06_ff369b3e8ca7495bdf12g-23.jpg?height=589&width=817&top_left_y=105&top_left_x=318)
Answer: 52.

Solution. Inside the square, we will write the length of its side. Let the sides of the two squares be $a$ and $b$, and we will sequentially calculate the lengths of the sides of the squares.
![](https://cdn.mathpix.com/cropped/2024_05_06_ff369b3e8ca7495bdf12g-23.jpg?height=876&width=1184&top_left_y=902&top_left_x=138)
![](https://cdn.mathpix.com/cropped/2024_05_06_ff369b3e8ca7495bdf12g-24.jpg?height=872&width=1174&top_left_y=100&top_left_x=138)

The sum of the lengths of the sides of the two squares adjacent to the left side of the rectangle is equal to the sum of the lengths of the sides of the two squares adjacent to the right side of the rectangle. We get the equation

$$
\begin{aligned}
(2 a+b)+(3 a+b) & =(12 a-2 b)+(8 a-b) \\
5 a+2 b & =20 a-3 b \\
b & =3 a
\end{aligned}
$$

Thus, to minimize the perimeter of the rectangle, we need to choose $a=1$, $b=3$. It is easy to check that with these values, the rectangle will have dimensions $11 \times 15$, and its perimeter will be 52.