Let the coordinates of A and B be A(x,y) and B(a,b).
Considering the line segment AQ, P becomes the mid-point of AQ.
Therefore applying mid-point formula, we get
2=x+62 and 1=y+22
⇒x=−2 and y=0
Now, considering line segment PB, Q becomes the mid-point.
Therefore applying mid-point formula, we get
6=a+22 and 2=b+12
⇒a=10 and b=3
Therefore, coordinates are A(−2,0) and B(10,3).