Since the speed of light is very high, we can assume that the flash reaches Andrew istantaneously after the firing of the cannon. Therefore, the delay between the sound and the flash corresponds to the time it takes for the sound to reach Andrew. This time is equal to t=6.81 s. The velocity of the sound is v=343 m/s, therefore the distance covered by the sound is

and this is the distance of the cannon from Andrew.