<s>[INST] Triangle problem I have got one simple task to prove: 
We have got a triangle $\triangle XYZ$.
Then we create points $A,B,C$ on $XY, YZ, ZX$ respectively, such that $XA = AB = BZ$ and $CZ = AY = AC$.
How to prove that $XY = \frac{XZ + YZ}{2}$?

 [/INST] Choosing coordinates
Based on the variables $a$, $b$ and $c$ we define coordinates for your points like this, without loss of generality:
\begin{align*}
  X &= \begin{pmatrix}-1\\0\end{pmatrix} &
  Y &= \begin{pmatrix}1\\0\end{pmatrix} &
  Z &= \begin{pmatrix}b\\c\end{pmatrix} \\
  A &= \begin{pmatrix}a\\0\end{pmatrix} &
  B &= Z + (1+a)\frac{Y-Z}{\lVert Y-Z\rVert} &
  C &= Z + (1-a)\frac{X-Z}{\lVert X-Z\rVert}
\end{align*}
This choice of coordinates already ensures that $AX = BZ = (1+a)$ and $AY = CZ = (1-a)$.
Some computer algebra
Now you have to ensure that $AB$ and $AC$ play along as well, which leads to two equations that my computer algebra system initially writes as
\begin{alignat*}{2}
\lVert A-B\rVert &\,=\,&
\sqrt{{\left| \frac{{\left(a + 1\right)} c}{\sqrt{c^{2} + {\left| b - 1
\right|}^{2}}} - c \right|}^{2} + {\left| \frac{{\left(b - 1\right)}
{\left(a + 1\right)}}{\sqrt{c^{2} + {\left| b - 1 \right|}^{2}}} + a - b
\right|}^{2}} &= a + 1 \\
\lVert A-C\rVert &\,=\,&
\sqrt{{\left| -\frac{{\left(a - 1\right)}
c}{\sqrt{c^{2} + {\left| b + 1 \right|}^{2}}} - c \right|}^{2} + {\left|
-\frac{{\left(b + 1\right)} {\left(a - 1\right)}}{\sqrt{c^{2} + {\left|
b + 1 \right|}^{2}}} + a - b \right|}^{2}} &= -a + 1
\end{alignat*}
Now you square the equations, multiply by the common denominator, put the remaining root on one side and the rest on the other, square again, and eventually solve for $a$ and $c$ depending on $b$. There will be multiple solutions, most of them complex, and one degenerate with $c=0$ which I'll discuss below. The remaining solutions only differ in signs, so we can write them as one using $\pm$.
The expression for $a$ is quite complex, but the one for $b$ is simply
$$c = \pm\frac12\sqrt{12-3b^2}$$
which you can write as
$$3b^2 + 4c^2 - 12 = 0\;.\tag{1}$$
It's an ellipse
Our aim is to prove the equation from your question,

$$XY=\frac{XZ+YZ}{2}\tag{2}$$

As Arthur pointed out in his comment, this condition can be interpreted as a condition that $Z$ lies on a certain ellipse with $X$ and $Y$ as its focal points. There are many such ellipses, so you still need one more point on the ellipse to specify which one you actually want. In our coordinate setup, $(2,0)^T$ is an example of a point which satisfies your equation and therefore has to lie on the ellipse.
Equation $(1)$ does indeed describe an ellipse. I don't feel like computing its focal points from the equation just now. Instead, observe that from the form of this equation (i.e. only pure squared monomials and constant term, no bare $x$, $y$ or mixed $xy$), the ellipse has its center of symmetry at the origin, and its axes coincide with your coordinate axes. By simply inserting coordinates into the equation, you can check that the following points lie on this ellipse:
$$ \begin{pmatrix}\pm2\\0\end{pmatrix}
\quad\text{and}\quad
\begin{pmatrix}0\\\pm\sqrt3\end{pmatrix} $$
Both of these pairs of symmetric points satisfy $(2)$: the first can be easily checked as all points are on a line, whereas the second corresponds to the equilateral case. For an ellipse whose axes coincide with the coordinate axes, the above points already define both radii, and therefore uniquey define the ellipse.
To conclude, we know that all points satisfying $(1)$ lie on an ellipse, we know that $(2)$ describes an ellipse, and we know that these two ellipses are the same. As all non-degenerate configurations satisfying the initial length equalities will lead to $(1)$, we now have proven $(2)$ to hold.
Degenerate situation
The equations stated above also have one solution
$$a=b\quad c=0\;.$$
This means that you can also satisfy your length equalities by choosing $A=Z$, so that your whole configuration collapses to a single line. In that case, $(2)$ does not necessarily hold, as the following example demonstrates:
\begin{align*}
  X &= \begin{pmatrix}-2\\0\end{pmatrix} &
  C &= \begin{pmatrix}-1\\0\end{pmatrix} &
  A=Z &= \begin{pmatrix}0\\0\end{pmatrix} &
  Y &= \begin{pmatrix}1\\0\end{pmatrix} &
  B &= \begin{pmatrix}2\\0\end{pmatrix}
\end{align*}
This leads to
\begin{align*}
  XA=AB=BZ &= 2 \\
  CZ=AY=AC &= 1
\end{align*}
but
$$ XY = 3 \neq \frac32 = \frac{2+1}2 = \frac{XZ + YZ}{2}\;. $$
So you should require that your triangle is non-degenerate.
</s>