Dear Student
Speed =Distance travelled / Time taken
Echo is a reflected sound. To hear an echo, sound has to travel a distance from the source to the reflector and then back to the source.
So, if distance between source and reflector is x, then total distance travelled by sound will be 2x. And suppose time taken is 't'.
Speed of sound=Total distance travelled / Time taken
=2 x / t
Regards