An accident happened and the OP was nearby.
At the very least, after determining that there was no big threat to life or limb, it would have been nice to have talked to Driver #1, something along the lines of
"Thanks for trying to stop and let me cross. Bummer that you got rear-ended. Here's my name and phone number in case you need to get in touch with me later."
Driver #1, who did the skid-stop, was trying to be nice or to obey the signal as they understood it. Driver #2 was following too close, and apparently was not paying attention to the car in front, nor to the signal -- why weren't they trying to stop at the yellow/about to be red light? Driver #1 might need a witness to help with an insurance claim at least.
Then, after it's all said and done, go home laughing, if you will, and tell your cycling friends about the nutty drivers out there who don't know what a yellow light means.