inelastic collision ... momentum is conserved

let x be the distance both cars travel up the incline and f be the force of friction ... use energy concepts to determine x

kinetic energy after the collision - work done by friction = final gravitational potential energy