Step-by-step explanation:
come on ! based on all the other questions that have been answered AND explained you should be able to find these answers yourself now. what is still unclear ?
distance between 2 points (x1, y1) and (x2, y2):
Pythagoras : c² = a² + b²
c is the connection between the 2 points (and which length we need to find).
c = sqrt(a² + b²)
a and b are differences of the x coordinates and the differences of the y coordinates of these 2 points.
a = x1 - x2
b = y1 - y2
this is simply because, when you look at the coordinate grid, these 3 items make a right-angled triangle.
don't worry about any negative values for a and b, as the square eliminates the negative sign.
midpoint between 2 points :
we could use Pythagoras again for this, but the end result is so simple, we can skip this.
at the end the coordinates of the midpoint of 2 points (x1, y1) and (x2, y2) are
((x1+x2)/2, (y1+y2)/2)
find the other endpoint (x2, y2), when you have one endpoint (x1, y1) and the midpoint (xm, ym) :
from above you know
xm = (x1+x2)/2
2×xm = x1 + x2
x2 = 2×xm - x1
and in the same way
ym = (y1+y2)/2
2×ym = y1 + y2
y2 = 2×ym - y1
and you can read a graph, right ?
if not it is high time to learn that very simple and basic skill :
the x coordinate of a point is how many units right (positive) or left (negative) from the center point it is.
the y coordinate of a point is how many units above (positive) or below (negative) from the center point it is.
the center point is always (0, 0).
so, what else do you need ?
I am very busy explaining things. I should not spend my little time doing the basic calculations for you (that I could train a monkey to do).
so, please, oil your brain machinery by following the instructions and formulas using the actual numbers and see how the results build out of this.
if you run into further problems, please ask me for additional explanations.