Let given points be
A(x2,y+12),B(x+1,y−3)andP(5,−2)
Since, P is midpoint of line segment AB
x2+x+12=5
x2+x+1=10
3x2=9
x=6
and
y+12+y−32=−2
y+12+y−3=−4
y+1y+2y2=−1
3y+1=−2
3y=−3
y=−1