4. (7 points) Two squares share a common vertex. Find the ratio of segments \(AB\) and \(CD\), as shown in the figure.

![](https://cdn.mathpix.com/cropped/2024_05_06_1cdfd8493964a22f216ag-2.jpg?height=357&width=640&top_left_y=1449&top_left_x=708)
Answer: $1: \sqrt{2}$.

Solution. Let point $O$ be the common vertex of two squares, and their sides are equal to $a$ and $b$. The diagonals of the squares are $\sqrt{2} a$ and $\sqrt{2} b$ respectively. Moreover, $\angle C O D=\angle C O B+\angle B O D=\angle C O B+45^{\circ}=\angle C O B+\angle A O C=$ $\angle A O B$. Triangles $A O B$ and $C O D$ are similar by the common angle and proportional sides at this angle.

![](https://cdn.mathpix.com/cropped/2024_05_06_1cdfd8493964a22f216ag-2.jpg?height=360&width=625&top_left_y=2256&top_left_x=778)

Therefore, $A B: C D=1: \sqrt{2}$.

Criteria. Any correct solution: 7 points.

The ratio of $A B$ to $C D$ is correctly calculated, but the ratio of $C D$ to $A B$ (i.e., the answer $\sqrt{2}$) is given: 7 points.

The similarity of triangles $A O B$ and $C O D$ is proven, but the subsequent conclusion is missing or the required ratio is found incorrectly: 6 points.

It is proven that $\angle A O B=\angle C O D$, but further progress is absent: 1 point.

Only a special case is considered (for example, when the squares share a side or when the angle between some sides of the two squares is $\left.90^{\circ}\right): 0$ points.

Only the correct answer is provided: 0 points.