[I am starting from the end of part1]
From the law of conservation of energy, we can say that if one or more than one object is in motion, then they’ll have a assembled kinetic energy. If no external force is applied, their net kinetic energy will remain unchanged. Collision among themselves can increase or decrease kinetic energy individually.
We can rewrite equation no 1 like this-
Alike doing with equation no 2,-
Now divide (6) by (4):
multiply (7) by m_2
By sunstracting (3) form 8,
Similarly,multiply (7) by m_1 and then add (3) to get v_2