I travel by public transport a lot. So I have also dealt with a fair share of overstuffed trains and buses. And the rudeness people exhibit in these situations. I'm from Northern Europe though.
First of all, it is important to remember that the other person wants to get to their destination just as desperately as you. Just the sight of an overstuffed bus or train is most likely to ruin their mood. They need to get on it, whatever it takes, because they have places to go and times to be there.
So never ask "what do you think you're doing". That should be quite obvious: They want to get on that bus, whatever it takes.
This is of course absolutely not a reason to be rude, but I find it easier to remember to be polite myself. My solutions to these situations are most often based on these thoughts as well.
- My number one solution when somebody starts pushing to get on the bus? Shout out a loud cry of pain. Act like their pushing is hurting you. The surprise of you shouting out will probably stop them pushing for a while (at least, it has always worked for me); Then ask them to please stop pushing, since it is hurting you.
To show a sense of goodwill, I usually follow step one with a shout across the bus/train, and ask the person to please wait a moment:
Hey guys, this person really needs to get on this bus/train as well. Can we somehow make some room for them? -- Please wait a moment madam/sir, we are trying to make some room for you.
If that doesn't stop the pushing, I start 'fighting back'. Don't move, however hard you are pushed. Just state calmly:
Madam/Sir, you can push all you want, but there really is no room here. I have no place to move to, I have no room I can make for you.
When I am on a bus, I usually make sure to say the last thing so loud, that the bus driver can hear this as well. The bus driver then usually changes the sign on the front of the bus to say "Sorry, this bus is full" instead of the sign saying the bus number and destination.
As for the situation with the male, I don't think you could have done any better. If people really choose to be that rude/mean, and they are complete strangers, the proper answer is to say nothing. You have tried your best to be polite, and if they choose to not reciprocate, that's entirely their fault. If you are really confident, you could make a comment like
I wasn't pushing, I'm sorry but I know a full bus can be really uncomfortable, but I really did not have the room to move when she started boarding, so it might have felt like I did push back, when instead we just collided.
But be prepared that somebody who already has his mind on unpleasantness might not react well to this. So, in my opinion, not feeding his unpleasantness was the right thing to do.