ti = 0. ; x1[ti] = 0. ; v1 = 0. ; x2[ti] = -5. ; v2 = 6. ; m1 = 1. ; m2 = 1. ; Dia = 1. ; tcollis = ((Dia - (x1[ti] - x2[ti]))/(v1 - v2)); NumFrames = 10. ; delta = (tcollis/NumFrames); Do[x1[t + delta] = x1[t] + v1 delta; 
      x2[t + delta] = x2[t] + v2 delta, {t, ti, tcollis, delta}]DeltaV2 = ((2 (v2 - v1))/(1 + (m2/m1))); DeltaV1 = -((m2 DeltaV2)/m1); v1 = v1 - DeltaV1; v2 = v2 - DeltaV2; Do[x1[t + delta] = x1[t] + v1 delta; 
      x2[t + delta] = x2[t] + v2 delta, {t, tcollis, 2 tcollis, delta}]

Do[Point1 = Graphics[{PointSize[0.1], Point[{x1[t], 0. }]}]; 
      Point2 = Graphics[{PointSize[0.1], Point[{x2[t], 0. }]}]; 
      xmax = -x2[ti]; ymax = 2 Dia; 
      Show[{Point1, Point2}, Axes -> True, 
        Ticks -> {{-5. , -2.5, 2.5, 5. }, None}, 
        AspectRatio -> 0.5, 
        PlotRange -> {{-xmax, xmax}, {-ymax, ymax}}], {t, 0. , 
        2 tcollis, delta}]