Definition:
Speed = (distance covered) / (time to cover the distance).
Speed in the first example = (10 meters) / (1 second) = 10 m/s .
Speed in the second example = (20 meters) / (2 seconds) = 10 m/s.
Apparently, it is. This little exercise demonstrates it.