you use a modification of the pythagorean theorem to find
pythagoreas c^2=a^2+b^2
the easy way is you use the equation \(d= \sqrt{(x1-x2)^2+(y1-y2)^2}\)
so input in format (x,y) then
(2,2)
(7,5)
x1=2
y1=2
x2=7
y2=5
\(d= \sqrt{(2-7)^2+(2-5)^2}\)
\(d= \sqrt{(-4)^2+(-3)^2}\)
\(d= \sqrt{16+9}\)
\(d= \sqrt{25}\)
\(d= 5\)
the distance is 5 units