Speed = (distance traveled) / (time to travel the distance).
Â
Strange as it may seem, 'velocity' is completely different.Â
Velocity doesn't involve the total distance traveled at all.Â
Instead, 'velocity' is based on 'displacement' ... the distance
between the start-point and end-point, regardless of the route
taken to get there. So the displacement in driving once around
any closed path is zero, because you end up where you started.Â
Velocity =
      (displacement during some time)
divided by
       (time for the displacement)
AND the direction from the start-point to the end-point.
For the guy who drove 15 km to his destination in 10 min, and then
back to his starting point in 5 min, (assuming he returned by way of
the same 15-km route):
     Speed = (15km + 15km) / (10min + 5min) = (30/15) (km/min)
                                         = 2 km/min.
    Velocity = (end location - start position) / (15 min) = Zero .