Object 1 has a mass of 3m and is moving to the right at a velocity of
4v. Object 2 has a mass of m is moving to the left at v. After the objects collide inelastically, object A is moving to the left at a velocity of v (one third of its original velocity). Derive an expression for the final velocity V of object B.

I am confused because I thought the when it is an inelastic equation, then that means that the objects stick together. So how can you find the final velocity of object B (also it shows that after the collision, the two objects to in fact split apart)?