Question: There are two points on a plane: $A$ and $B$. Find point $X$ such that value of expression $AX+XB-XX'$ is minimal where $X'$ is orthonormal projection of $X$ on $AB$
Tip to task is to draw equilateral triangle $ABC$. I'm looking for elementary solution. Using algebra I found that the sought point $X$ is the orthocenter of triangle $ABC$. It seems to ma that it is a typical Heron's 'shortest distance' problem with the difficulty of subtraction which I cannot resolve.


If we fix $XX'$ (let's call it $a$), $X$ is on a horizontal line with distance $|XX'|$ from $AB$. then $|AX|+|BX|$ is minimal when $|AX|=|BX|$, because $$\min(|AX|+|BX|-|XX'|)=\min(|AX|+|BX|)-a=\min(\sqrt{a^2+|AX'|^2}+\sqrt{a^2+|AB-AX'|^2})-a$$ If we define $f(|AX'|)=\sqrt{a^2+|AX'|^2}+\sqrt{a^2+|AB-AX'|^2}$, we get that the minimum happens when $|AX'|=\frac{|AB|}{2}$, or in other words, $$|AX|=|BX|$$ We get that X is on the perpendicular bisector of $AB$. Out of all the points on this line, the intersection with $AB$ is the minimum
So $X$ is the middle of $AB$