Definition: Conservation of Momentum
If there is no force acting on a system of objects, then $F=0$, and so $\Delta p$ is 0. Thus, we have conservation of momentum. If there is no external force acting on a collection of objects, then their momentum will always be the same. Internal forces of interaction between the objects will cancel out via Newton's Third Law.

Idea: Inelastic Collisions
An inelastic collision is one where two objects collide and stick together (move together as one object). In any collision, so long as there is no external force on the objects, momentum is conserved. Thus, if I have a mass $m_1$ moving at velocity $\vec v_1$ and a mass $m_2$ moving at velocity $\vec v_2$ which collide inelastically, they form a final mass of $m_1+m_2$ with some velocity $\vec v$ given by $$m_1\vec v_1+m_2\vec v_2=(m_1+m_2)\vec v\Rightarrow \vec v = \frac{m_1v_1+m_2v_2}{m_1+m_2}$$

Idea: Elastic Collisions
Elastic collisions are collisions where the total kinetic energy is conserved. The most rudimentary process for determining velocities after a collision is to solve a system of equations by writing down the conservation of energy and momentum. We can also more generally define other types of collisions between the two extremes with what's called the \highlight{coefficient of restitution}, $$r = \frac{|v_{1f} - v_{2f}|}{|v_{1i}-v_{2i}|}.$$ $r=0$ corresponds to a perfectly inelastic collision, $r=1$ corresponds to a perfectly elastic collision, and $0 < r < 1$ represents everything in between.

Tip: Coefficient of Restitution
You can actually greatly simplify your work by using the coefficient of restitution. The previous idea essentially gives us an equation for free, $$|v_{1f} - v_{2f}| = |v_{1i} - v_{2i}|,$$ which you can combine with your conservation of momentum equation, to get the required 2 equation system of variables.

Another idea you can use to solve elastic collisions, which is perhaps more intuitive, is the center of mass frame.

Idea: Center of Mass Frame
The center of mass frame simplifies calculations for elastic collisions, and proves the coefficient of restitution. If two mass $m_1$ and $m_2$ collide with speeds $v_1$ and $v_2$, then their center of mass frame moves at $$v_{\text{cm}} = \frac{m_1v_1 + m_2 v_2}{m_1+m_2}.$$ Then, analyzing the collision in the center of mass frame, the velocities of the two objects simply reverse in sign, \begin{align*} v_{1cm, f} &= - v_{1cm, i} = v_{cm} - v_1,
v_{2cm, f} &= -v_{2cm, i} = v_{cm} - v_2. \end{align*} Thus, it is immediate that the magnitude of the relative velocity is the same, changing to $v_2 - v_1$ after the collision.

Idea: 2-D collisions
2-D Collisions work just the same, but we just need to conserve momentum in both $x$ and $y$ and total kinetic energy if elastic. That is, \begin{align*} p_{xi} &= p_{xf}
p_{yi} &= p_{yf}. \end{align*}