Let:
[tex]\begin{gathered} v_s=Speed_{\text{ }}of_{\text{ }}sound=343.3m/s_{\text{ }}at_{\text{ }}20^{\circ}C_{\text{ }}and_{\text{ }}1atm \\ c=Speed_{\text{ }}of_{\text{ }}light=3\times10^8m/s \end{gathered}[/tex]The speed of the sound decrases if the temperature is below 20. The change is 0.6m/s per ⁰C, so:
[tex]\Delta v_s=343.4-5(0.6)=340.4[/tex]We can write the speed in terms of the distance and the time as follows:
[tex]v=\frac{d}{t}[/tex]So, for the light:
[tex]\begin{gathered} t=\frac{d}{c}=\frac{800}{3\times10^8}=2.6667\times10^{-6}s \\ \end{gathered}[/tex]For the sound:
[tex]t=\frac{d}{\Delta v_s}=\frac{800}{340.4}=2.35s[/tex]Since:
[tex]2.6667\times10^{-6}s<2.35s[/tex]That's the reason why the smoke is seen before the sound is heard. The time delay for the sound of the pistol is 2.35 seconds