Good advice on what to do when you find yourself near a racist mouthy twat who is spouting out their crap at some unfortunate person.
NEVER engage the perpetrator. He (and it is usually he) is looking for confrontation. Instead speak to the person he is abusing. Say hello. Introduce yourself. Shake his or her hand. And just stand with them. Keep talking. About anything. Weather. Bus schedules. Football. This kind of bullying never works against a group of people having a conversation. Usually a single person travelling or a mom with a kid or maximum, two women are targeted.
Form a group of people with and around them if you can. Don’t tell them they are not alone. Just don’t let them be alone. I speak from experience. Once, I encountered a young girl wearing a hijab being abused as a terrorist by a drunk man on a train. I just went and sat beside her and started a conversation with her. After a while, the dude lost interest. I had a lovely chat with a young student from Qatar. She wanted to study literature while her dad was only prepared to pay for engineering or commerce as he wanted her to join the family business. It helped her feel safe and it expanded my horizons.
This is known in behavioral psychology as “non-complimentary behavior”; by not fueling the aggression of another person and you can flip the whole script of all their expectations, and without any footholds for their aggression (like direct provocation and confrontation/conflict) to launch into further tirades against, the aggressor can’t continue their angry scene-building. The more people who participate in script-flipping, the more successful it gets, as in this post you see with the advice to form a protective group between the bigot and their target for that very purpose.
There’s an NPR podcast called Invisibilia which goes into detail about how it works and what sort of people rely on it everyday professionally and for survival alike, in their Flipping the Script episode.