This question was asked in Misc 1

Distance between 2 points derivation

Latha A Shetty's image