If K is the point (x1,y1) and P is the point (x,y) the midpoint is M(½(x+x1),½(y+y1)).
If we know M(x2,y2), then we can find x and y which give us the point P.
x+x1=2x2 making x=2x2-x1 and y=2y2-y1.
The length of KP is found using Pythagoras' Theorem:
KP2=(2x2-x1-x1)2+(2y2-y1-y1)2=4(x2-x1)2+4(y2-y1)2,
KP=2√((x2-x1)2+(y2-y1)2).
Under the square root we have the square of the difference between the x-coordinates of the given end-point and midpoint plus the square of the difference between the y-coordinates of the same two points. KP is twice the square root of this sum. You can see that the problem breaks down into two main calculations: finding the point P given the other endpoint and the midpoint; and calculating the distance between K and P using Pythagoras.
Another (faster) way to do it is to find the length of KM and then doubling it--this would be faster because it doesn't require finding the coordinates of P. KP=2KM. So you can see that the square root is just the distance between K(x1,y1) and M(x2,y2), and twice the square root gives you KP.
So there's more than one way to find an answer and it's best to think the question through rather than looking for formulas.This solution shows you how to find the endpoint of a line segment, given the coordinates of one endpoint and a midpoint (you may need the method for answering other questions) and also how to find the distance between two points.