Car Animation

How can a object X location at frame 1 distance to object X location frame 2
be obtained ???

I am trying to do an car animation using drivers , but I guess I need that 3d vector
distance