4. (7 points) On the plane, there is a square $A B C D$ with side length 1 and a point $X$ (see the figure). It is known that $X A=\sqrt{5}, X C=\sqrt{7}$. What is $X B$?

![](https://cdn.mathpix.com/cropped/2024_05_06_e4cc57f832254e24a588g-2.jpg?height=428&width=502&top_left_y=294&top_left_x=777)
Answer: $\sqrt{6-\sqrt{10}}$.

Solution. Drop perpendiculars $X M$ and $X N$ from point $X$ to lines $C B$ and $A B$ respectively. Quadrilateral $B M X N$ is a rectangle; denote the lengths of its sides $B M$ and $N X$ by $a$, and $B N$ and $M X$ by $b$.

![](https://cdn.mathpix.com/cropped/2024_05_06_e4cc57f832254e24a588g-2.jpg?height=423&width=505&top_left_y=1042&top_left_x=844)

By the Pythagorean theorem for triangles $A N X$ and $C M X$, the following relationships hold:

$$
A N^{2}+N X^{2}=A X^{2}, \quad C M^{2}+X M^{2}=C X^{2}
$$

We obtain the system $(1+b)^{2}+a^{2}=5, \quad (1+a)^{2}+b^{2}=7$. Subtracting the first equation from the second, we get $2(a-b)=7-5$, i.e., $a=b+1$. Substituting $b+1$ for $a$ in the first equation, we get $a=\sqrt{\frac{5}{2}}$, from which $b=\sqrt{\frac{5}{2}}-1$. Applying the Pythagorean theorem to triangle $B M X$, we get

$$
B X^{2}=a^{2}+b^{2}=\frac{5}{2}+\frac{5}{2}-2 \sqrt{\frac{5}{2}}+1=6-\sqrt{10}
$$

Thus, $B X=\sqrt{6-\sqrt{10}}$.

Criteria. Any correct solution: 7 points.

A generally correct solution containing arithmetic errors that do not affect the solution process: 5 points.

Reasoning that does not lead to the answer or logically incorrect reasoning: 0 points.