"Success lies in being able to retreat at the right moment and in the right manner. The success is made possible by the fact that the retreat is not the forced flight of a weak person but the voluntary withdrawal of a strong one." ~ The I Ching or Book of Changes
The voluntary withdrawal of a strong person is an under-appreciated phenomenon. Knowing when to walk away, and being willing and able to do so is not trivial.
So often we consider retreat as being the result of weakness or cowardice. Often the opposite is true.
Taking the high road is always the best course of action. Not stooping to the level of those who might mistreat or abuse you takes a lot of strength. It is easiest to retaliate, seek revenge or 'react' in some way. It takes much more strength and maturity to simply leave people to their bad behavior, show a little compassion and walk away.
The bad behavior of others is not a license to behave badly yourself. That's a cop out.
The only person we can control is the one standing in our own shoes. Everyone else is responsible for their own actions and behavior. If we are tending to our own selves properly, we wouldn't have the time or energy to bother trying to change other people!
Leave people to their own issues, and focus on yourself. That's more than enough to keep you busy!