Escape and reentry of a Brownian particle through a hole in a cavity