Everything from the 1 lessons of this topic on a few pages: the key idea of each lesson, the diagram to remember, the points to learn and the traps examiners set. Read it, cover it, test yourself.
Momentum \(= mv\), measured in \(\text{kg m s}^{-1}\) (or N s), with a sign showing its direction. In a direct collision: \(m_1u_1 + m_2u_2 = m_1v_1 + m_2v_2\). If the particles coalesce, \(m_1u_1 + m_2u_2 = (m_1 + m_2)v\).
Subtracting the speeds gives \(0.2(15 - 12) = 0.6\) N s, which is wrong. The velocity changed sign, so the sizes ADD: \(0.2(15 + 12) = 5.4\) N s.
Every unknown velocity after the collision should be written as a signed variable, and the sign of the answer tells you the direction. A negative answer is not an error; it means the particle moves in the negative direction.
Do not do both collisions in one equation unless all the particles really do end up moving together. If A and B separate after the first collision, each must be tracked on its own.