The woman being racist is merely an assumption, we can not be certain until we have had a dialogue with her. She could be afraid for everyone she meets on that train. After all, the world is a scary place sometimes. Given the history of black people in America — and elsewhere, of course — I understand very well why a black man in this situation would not start a conversation to find out what is bothering the woman. He might end up in a jail or worse, for simply trying to connect.
Basically, whatever the colour of our skin may be, we all have to be careful with our assumptions and judgements.