Speed and distance-solving for speed