Firstly, let's look at two points with coordinates (x1,y1) and (x_2, y_2) with x_1 \neq x_2. Where does perpendicular bisector to the segment between them intersect the x-axis?
Let's say it's at point (X,0), then we must have $(x_1-X)^2 +