14. On a plane, there are two points $A$ and $B$, the distance between which is $d$. Construct a square such that these points lie on its boundary, so that the sum of the distances from point $A$ to the vertices of the square is the smallest possible. What is this sum?
14. We assert that the desired figure is the square $A A_{1} B B_{1}$, whose diagonal is the segment $A B$; the sum of the distances from $A$ to the vertices of this square is

$A B + A A_{1} + A B_{1} = A B (1 + \sqrt{2}) = (1 + \sqrt{2}) d$.

Indeed, let $C D E F$ be an arbitrary square with side $h$, on the boundary of which lie points $A$ and $B$ (Fig. 69; point $A$ lies on side $C D$). It is clear that

$$
A C + A D = h, \quad A E \geqslant h, \quad A F \geqslant h
$$

Therefore, the largest among the segments $A C, A D, A E, A F$ is one of the segments $A E$ or $A F$. Let, for example, this be the segment $A F$. Since among all points on the boundary of the square $C D E F$, the point $A$ is farthest from one of its vertices (compare with problem 1), then $A B \leqslant A F$.

Furthermore, among all pairs of points of the square $CDEF$, the farthest from each other are the vertices $C$ and $E$ (or $D$ and $F$; compare with problem 78a)); therefore,

$$
A B \leqslant C E = \sqrt{2} h
$$

From this, we have

$$
A C + A D = h \geqslant \frac{1}{\sqrt{2}} A B \quad \text{and} \quad A E \geqslant h \geqslant \frac{1}{\sqrt{2}} A B
$$

Therefore, since $A F \geqslant A B$,

$A C + A D + A E + A F \geqslant \frac{1}{\sqrt{2}} A B + \frac{1}{\sqrt{2}} A B + A B = A B (1 + \sqrt{2})$.

It is easy to see that the equality sign holds only for the square $A A_{1} B B_{1}$, i.e., only this square is the desired one.

![](https://cdn.mathpix.com/cropped/2024_05_21_d4ffc236376258137647g-134.jpg?height=315&width=285&top_left_y=801&top_left_x=801)

Fig. 69.