I do think favoritism exists in every workplace and that it is just a matter of how severe or apparent it is. Although such is the case, having favoritism, even in the slightest sense, isn't a good practice, as this may create hostile environment for most employees. Whether I'm the victim or the VIP, I don't think I'd be able to handle this properly but this are the things that I might do:
1. I will speak to my boss about this. As I have always said, I am a firm believer that anything can be resolved in talking things over and that compromises or agreements can be arrived at. If I am the one being favored, I will mention it in as subtle way as possible so as not to sound very arrogant. Otherwise, if I am the victim, I will make sure that I am not accusing my boss of such case because that can even backfire. He or she can easily deny it; hence, I'd be the one in trouble instead. In this situation, I'd rather offer my services to be able to be considered in other opportunities.
2. No matter how appealing the opportunity is, If I know that I'm just being favored and that someone is best suited to handle the work, then I'd give way. I will say no even if the boss insists. Because what good will it bring if we are to waste the skills and intelligence of other employees. I also don't think that people will stay for long if they will always remain unnoticed. However, if I am the one being deprived of opportunities, I will speak to the one being favored and ask him or her to get me on board of the project. Being involved in these works may lead them to realize that there are other employees who are also capable of doing such things. However, I'd make it a point to not engage in unhealthy competitions because this might just ruin my career.
3. I will refuse of any other benefits that comes with being favored. For instance, I might be easily given approvals for vacations but if I know that this doesn't happen to anyone, then I won't be too opportunistic even if I want it so bad.