[tex]\bf ~~~~~~~~~~~~\textit{middle point of 2 points }\\\\
\begin{array}{ccccccccc}
&&x_1&&y_1&&x_2&&y_2\\
% (a,b)
&&(~ -2 &,& 6~)
% (c,d)
&&(~ x &,& y~)
\end{array}\qquad
% coordinates of midpoint
\left(\cfrac{ x_2 + x_1}{2}\quad ,\quad \cfrac{ y_2 + y_1}{2} \right)
\\\\\\
\left( \cfrac{x-2}{2}~~,~~\cfrac{y+6}{2} \right)=\stackrel{midpoint}{(4~~,~~5)}\implies
\begin{cases}
\cfrac{x-2}{2}=4\\\\
x-2=8\\
\boxed{x=10}\\
------\\
\cfrac{y+6}{2}=5\\\\
y+6=10\\
\boxed{y=4}
\end{cases}[/tex]