Using distance formula, we have:
AB = ?(-5+1)2 + (4+2)2 = ?16 + 36 =?52
BC = ?(-1-5)2 + (-2-2)2 = ?36 + 16 =?52
CA = ?(-5-5)2 + (4-2)2 = ?100 + 4 =?104
Now, AB = BC and AB2 + BC2 = CA2
Hence, the given vertices are the vertices of an isosceles right triangle.
Since, ABCD form a square, AC = BD
(The diagonals of a square are equal)
Therefore, AC2 = BD2
Now, apply the distance formula to find AC2 and BD2 and then equate both to get a relation between x and y. (1)
Also, all sides of a square are of equal length.
So, AB = AD
This will give you another relation between x and y. (2)
Solve the two relations/equations to get the value of x and y and hence to get the coordinates of point D.