Given,
Distance between the boys =Distance travelled by sound
=1020 m
Now, since the sound of firing reaches the boy after
3 seconds, speed of sound is,
Speed =Distance travelled by soundTime taken
=1020 m3 s=340 m/s
Hence, the speed of sound is 340 m/s.