Measurement can be done by radar technology, but I am looking for cheaper solution that can measure long term travelling at an instantaneous basis means, maybe every second or so measuring both distance and speed.
You may utilize wireless communication technologies. Depending on the maximum distance between the vehicles, you may choose Bluetooth, XBee or WLAN, etc. The speeds may be optically measured at the wheel of each vehicle as already described. Then you can send the speed value via the radio connection and calculate the distance from the package delay. Some application notes and publications can be found on this topic. You are limited to the sample rate, but 1 second should not be a problem.
If you want simple experimental apparatus for off-line analysis, just log GPS data with any logger (event smartphone can do the job).
If you want do not have access to the front vehicle, they you may use an industrial LIDAR (for instance something like SICK LMS serie) with 1 one laser layer (cheap) or 4 layers (more expensive). They are "cheap" but quite heavy and not initialy designed for automotive application (i.e. no CAN bus, only serial or ethernet application). BUT not only you will have the distance but also the relative position. At last, some similar devices have been especially designed for automotive, but they are very expensive (cf IBEO company for instance).
I'm sorry, but there are no ready made systems I know. I would have to search. A collegue of mine tested the XBee for real time wireless communication (