Answer
3.03s
Work Step by Step
The gun is fired horizontally, meaning that the bullet has no vertical velocity or that $v_{0y} = 0$. However, it does have vertical acceleration, which is $a_{y} = -9.81 m/s^2$. To find how long it is int he air we use:
$ y = y_{0} +v_{0y}t + (1/2)at^2 $ where $y_{0}$ is the initial height, 45m and y is the final height of 0 when it strikes the ground.
$0 = 45 + 0 + (1/2)(-9.81)t^2 $ so solving for t we find that it is 3.03s