First let me preface this by saying, I think there's a better way to approach this problem by using a different metric (i.e. something like using polar coordinates rather than euclidean X,Y coordinates).
That said, using standard X,Y coords, the easiest way I can see to approach this problem is a test and reject pattern:
- Randomly generate a potential new destination (see note below about this step)
- Test if the line between the current position and the current destination under consideration clips the center circle. If so, reject the current point & go back to step 1.
- Otherwise the current destination is valid & should be used as the next random heading.
While easy to implement, test and reject strategies should always be throughly vetted before use. They don't always work well in situations where you need an immense amount of solutions (i.e. trying to solve multiple instances of the problem repeatedly in real time) or in situations with lots of constraints (i.e. avoiding other obstacles, maintaining line of sight on enemies, etc). That said, they often give answers that are good enough, quickly enough to allow you to focus on the more interesting parts of the game, so don't be too put ooff by the potential ineffiecency.
Regarding the generation of random points: beware of simply picking a random angle & distance, as this will result in a bias towards points near the center. The solution to this problem is to take the square root of the radius which will skew the selection back to a uniform distribution.