Bullet physics 101:
The bullet, as it is traveling down the barrel, is being accelerated upwards by the barrel, since the barrel, stock and rifleman are being accelerated by the earth. Once the bullet leaves the barrel, it is no longer being accelerated and travels upwards at a constant velocity. It has a horizontal velocity that is of no importance here. The earth, still accelerating, must gain a velocity higher than that of the bullet in order to catch it. The time it will take can be found via:
t = sqrt(2*height/(9.8m/s^2))