Solve each problem.
Prove that the midpoint $M$ of the line segment joining endpoints $P\left(x_{1}, y_{1}\right)$ and $Q\left(x_{2}, y_{2}\right) has coordinates
$$
\left(\frac{x_{1}+x_{2}}{2}, \frac{y_{1}+y_{2}}{2}\right)
$$
by showing that the distance between P and M is equal to the distance between M and Q and that the sum of these distances is equal to the distance between P and Q.