Now the above formulas follow from solving a system of linear equations for v A 2 , v B 2 , regarding m A , m B , v A 1 , v B 1 as constants: { v A 2 − − v B 2 = v B 1 − − v A 1 m A v A 1 + m B v B 1 = m A v A 2 + m B v B 2 . Once v A 2 is determined, v B 2 can be found by symmetry.