add the x coordinates of point A and B(take x coordinate of B as X),then divide the sum of 2 and equal it to 2 which is the x coordinate of the midpoint.
then repeat the same procedure for the y coordinates ,take the sum of y corrdinates divide by 2 and equal to 8.