I have a circle with radius $R$ and center $(x,y)$ and I have the coordinate of a point; I want to find the minimum path between this point and the border of circle. Here is a picture of what I said:

Sorry if the picture is a disaster, I hope you will get the point.
You just need to find the distance between the point and the center of the circle and then subtract the radius from it.