>>28680708
but that's literally the comparison metric you are looking for
the average distance between two cars over a period of time needs a fixed distance to determine (like a lap or a rally stage), and then you calculate the difference between the two cars from the finish times and average speeds. beamng in particular has no way of directly calculating it. you will have to run both cars yourself with the hotlap function then do the math to find the difference.