The radius of the rim = 18/2 = 9 inches
So.....we need to find the radius of the ball
Circumference = 2 * pi * radius
30 = 2 * pi * radius divide both sides by *pi
30 / ( 2 * pi) = r = 15/ pi inches
So the distance between the rim and the ball =
[ 9 - 15/pi ] inches ≈ 4.225 inches