Explanation:
it is very simple :
the midpoint coordinates are created as the midpoint of the x coordinates, and the midpoint of the y coordinates.
the x coordinate of the midpoint is
(0 + 10)/2 = 10/2 = 5
the y coordinate of the midpoint is
(-2 + -6)/2 = -8/2 = -4