Speed of sound, v = 342 m s−1
Echo returns in time, t = 3 s
Distance travelled by sound = v × t = 342 × 3 = 1026 m
In the given time interval, sound has to travel a distance that is twice the distance of the reflecting surface and the source.
Hence, the distance of the reflecting surface from the source = 1026/2 = 513 m