Here in this type of collision problem we can say that there is no external force on the system of two cars
So we can use the momentum conservation in this

here we have




now from above equation we will have



so both cars will move together with speed 2 m/s