I feel that in a type of situation like that you should tell the person that's being racist towards someone else or to you to honestly just back off, let them know that it's not ok and you shouldn't be doing it, I do understand that some people might not listen to you if you say what I just mentioned but I would report it to someone that you can trust, if it's at school I suggest a teacher. Honestly if you end up throwing a punch at someone at school you would most likely get suspended and the person who said something racist to you or someone else would most likely not get suspended.