Thank you for the opportunity to help you with your question!
a. The type of collisition is plastic . When two objects collide into one after impact we call the collition plastic . If they do not form one object we call the collition elastic .
b. To do that calculation we need the initial momentum of the system .
we consider the right side as possitive for velocity and we get
m1 * u1 + m2 * u2 = 5*2.5 + 8 * (-2.5) = 12.5 - 20 = -7.5 kg * m / s
Due to the fact that there are only preservative powers in the system the momentum will be preserved meaning the momentum of the system after the plastic collition will be the same thus 7.5
the two cart system will have the equal mass of the the two initial carts meaning m1 + m2 = m = 5 + 8 = 13 kg
the momentum of the two cart system will be m * v where v is the velocity of the combined carts
as we stated above the two momentums -before collition - and after will be the same thus
m*v = 7.5 => 13*v = -7.5 => v = 0.576 m /s will be the velocity of the combined carts . The negative sign means that the velocity is opposite the to right side we took as possitive meaning the object moves to the left
Please let me know if you need any clarification. I'm always happy to answer your questions.