I don't understand the green lines. Why do both suddenly jump from 0 to 12 when the light cart hits its buffer? And what does the mass matter in case A, with the brakes on?For whatever it's worth, here is a plot of the positions of the two cart and platform as a function of time. The parameters of the masses are 1, 2 and 80 units (1 unit = 10 kg). The corresponding initial velocities were -4 m/s, +2 m/s and 0 m/s. When the two carts stick together their common velocity is -9.6×10-2 m/s while the platform's velocity is +3.6×10-3 m/s.
View attachment 319607
And here is part B. I took the mass of the platform to be equal to the mass of the Earth, 6×1023 units.
View attachment 319609