In two-dimensional inelastic collision conservation of momentum is separately applied separately along each axis.
This is because the car after crash will break down after collision but the total system momentum will be conserved.
According to conservation of momentum, the total momentum in an isolated system remains constant.