Assuming the bug's initial velocity is negligible, the bug will pick up speed due to the acceleration gsinθ where θ is the vertical angle formed between the original position, the center of the man's head, and the position of the bug in time.
The bug will leave the man's head when the force pulling the bug into the head (mgcosθ) cannot supply the centripetal force, mv2/R
Because the force varies with position and time is not a primary variable, we can use an energy approach. From the geometry, the loss of gravitational energy at θ given θ is mgR(1-cosθ). This is equal to the gain in kinetic energy (1/2)mv2. This leads to v2 = 2gR(1-cosθ) (This looks like the equation for a pendulum)
Now we can solve for θ using v2/R = gcosθ = 2g(1-cosθ) (h = R(1-cosθ) = R/3 which is what was asked for)
Please consider a tutor. Take care.