If the distance is increase by 10 times, the surface area will increase 100 times.

So the energy density will be reduced to 1/100.

The sound level is measured in db:

if the energy is reduced to 1/10, the sound level will be increase by 10 db.

if the energy reduced to 1/100, the sound level will be increase by 10+10=20db.

if the energy reduced to 1/1000, the sound level will be increase by 10+10+10=30db.

Assume the gun fire is a point sound source,

if you can measure the sound level at 30 feet away (assume it is 120db),

then the sound level at 300 feet can be eastimated as 120-20=100db,

and the sound level at 3000 feet can be eastimated as 120-40=80db.

The sound level can be further reduced if sound can be reflected by a high enough wall.