Calculating the velocity of a car towards another car

I have a Car1 traveling (not directly) towards another Car2, both cars can freely drive away from each other (making the velocity from Car1 to Car2 negative)

What I know of the cars is the velocity, location (Vectors) and their distance in a 3d space.

Both Cars are not traveling at a constant speed, nor in a fixed position (straight line), Car2 could stop. This would obviously result in Car1 approaching Car2 at the velocity of Car1.

What I'm having trouble figuring out is how fast is Car1 approaching Car2?

Would anyone have an ideas where to start, or some formula?

• Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
– Community Bot
Commented Jan 24, 2022 at 1:38
• This seems too general. Are there any restrictions on the curves defining the motions of the cars? Commented Jan 24, 2022 at 1:44
• @JohnDouma I mean there are X, Y, Z. I'm just interested in the velocity of their approach. The speed at which they are approaching, or going apart. Commented Jan 24, 2022 at 1:49
• Calculate their positions and velocities from a coordinate system centered at one of the cars. Then, whatever velocity you compute for the other car will be the relative velocity. Commented Jan 24, 2022 at 1:57
• First calculate the velocities of the cars along the line joining them,after which use the concept of relative velocity.
– user1012971
Commented Jan 24, 2022 at 3:29