5.1. $B$ of trapezoid $A B C D: \angle A=\angle B=90^{\circ}, A D=2 \sqrt{7}, A B=\sqrt{21}, B C=2$. What is the minimum value that the sum of the lengths $X A+X B+X C+X D$ can take, where $X-$ is an arbitrary point in the plane?

![](https://cdn.mathpix.com/cropped/2024_05_06_e273449a9e482933432fg-1.jpg?height=269&width=485&top_left_y=2270&top_left_x=177)
# Answer: 12

Solution. By the triangle inequality $X A+X C \geqslant A C$, and equality is achieved when $X$ lies on the segment $A C$. Similarly, $X B+X D \geqslant B D$, and equality is achieved when $X$ lies on the segment
$B D$. Thus, $X A+X B+X C+X D \geqslant A C+B D$, and equality is achieved when $X$ is the intersection point of the diagonals. By the Pythagorean theorem $A C=\sqrt{A B^{2}+B C^{2}}=5, B D=\sqrt{A B^{2}+A D^{2}}=7$, hence $A C+B D=12$.