For two colliding objects, compare total vector momentum before and after. It is conserved when external impulse during the collision is negligible. Write a minus sign for velocities opposite the chosen direction.
An elastic collision conserves total kinetic energy as well as momentum. In an inelastic collision total kinetic energy decreases. For two objects that stick, use their combined mass and common final velocity.
For two bodies in a one-dimensional elastic collision, relative speed of approach equals relative speed of separation. Together with momentum conservation this determines the final velocities. Equal masses exchange velocities under these conditions.