Distance between 2 points

By constructing a right-angled triangle and using Pythagoras' Theorem, we can find the distance between 2 points on the Cartesian plane. Drag the red points and then use the blue slider to reveal the solution.
Can you develop a formula for the distance between 2 points?