The appropriate thing to do is what you would do with any math.
• Study the reference material and examples you are given, making sure you understand where the formulas apply and how they are used.
• Memorize the formulas you cannot derive easily based on the understanding you have.
• Work homework and extra problems until you can apply the formulas quickly and easily to any problem to which they are relevant.
_____
The distance formula is based on the Pythagorean theorem. For a right triangle of side lengths a and b and hypotenuse c, the Pythagorean theorem tells you
c² = a² + b²
Taking square roots, you get
c = √(a² + b²)
When "a" and "b" are the differences of coordinates in the Cartesian plane, this becomes the distance formula:
d = √((x₂-x₁)² + (y₂-y₁)²)
You can arrive at the midpoint formula a number of ways. I find it convenient to remember that the coordinates of a midpoint are simply the average of the coordinates of the end points. That is,
for midpoint M = (mx, my), and endpoints A = (ax, ay), and B = (bx, by)
M = (A+B)/2
(mx, my) = ((ax +bx)/2, (ay +by)/2)