matching type match column a with column b

Explanation:
Distance is the total length travelled by a moving object