This should help:
https://www.chegg.com/homework-help/definitions/distance-formula-63#:~:text=The%20distance%20formula%20is%20used,%2C%20d%2C%20between%20two%20points.&text=The%20distance%20formula%20is%20derived,distance%20between%20the%20two%20points.