We use the equation of motion for vertical component,
[tex]s_{y} = u_{y} t+\frac{1}{2} gt^2.[/tex]
Here, [tex]s_{y}[/tex] is displacement of bullet, [tex]u_{y}[/tex] is vertical initial velocity of bullet which is equal to zero because bullet was fired horizontally, and t is time of flight.
Therefore,
[tex]s_{y} =\frac{1}{2}gt^2[/tex]
Given, [tex]s_{y} =2.3 \ cm = 2.3 \times 10^{-2} \ m[/tex]
Substituting the values, we get time of flight
[tex]2.3 \times 10^{-2} \ m = \frac{1}{2} \times 9.8 \ m/s^2 \times t^2 \\\\ t =\sqrt{46.94 \times 10^{-4} \ s } = 0.069 \ s[/tex]