# A random circle inside a bigger circle

Given a circle with radius 1, a point A with a distance of d from its center, and a circle with radius r randomly and uniformly chosen inside the bigger circle, what is the average shortest distance from A to the random circle's circumference (If the point is inside the circle, the distance is 0)?

I could assume I could do this with an integral, but I can't figure out how to get the function.

Hint: Are you guaranteed that the small circle is entirely within the large circle? If so, the distance from the small circle to the large circle is along the radius through $A$ and is $1-d-r$. $d$ is distributed proportional to $d$ in the range $[0,1-r]$ If you are not, any time $d \ge 1-r$ the distance is zero and the distribution of $d$ is again proportional to $d$ but over the range $[0,1]$