In a collision in space (no friction against the ground causing the pieces to stop), the combined center of mass of all the objects involved keeps moving at the same velocity at all times.
Two approximately round space rocks of exactly equal size and density have a center of mass that is halfway between them. If one is moving 40 mph (according to the observer's frame of reference) and the other is catching up to it in exactly the same direction at 50 mph, then what it means is that the center of mass between the two rocks is moving at 45 mph. If the rocks collide in such a way that they clump together (inelastic collision) and no pieces fly off, the combined double rock will thereafter be moving at 45 mph.
Vehicle collisions are more complicated because of cars skidding and rolling. In the milliseconds after the main impact though, those effects don't matter that much, I think. E.g. if you hit a parked car that is in neutral with no parking brake, versus one that has its transmission and brakes locked down, and this happens at 100 mph, I suspect those factors hardly make a difference.