Being kind towards them and see if they change their attitudes.
I always believe that it takes two to be together or end up quarreling. So, instead of being horrible to them, shower them with kindest and acceptable. Some times a person can be nasty due to some other factors and if you show the same way, it will not be helpful.
We at times need to be understanding as we will also have bad days. So, learn to be understanding and show kindness towards them. I truly believe everyone by nature is kind heart. It is just that we may not have met these people but doesn't mean that we should show the same attitude as them.