1. Gather information.
How appropriate is it for you to just leave? Are there many gaming groups, and you just started with this one? Or is this a close group of your friends that have been together since grade school, and you really do not know any other gaming groups in town?
2. Develop a Best Alternative to Negotiated Agreement.
Your bargaining position is going to be better the less you have a vested interest in the outcome. This works throughout life. Want a raise at work? Working hard won't work -- that shows your boss that you'll put out at the salary he's giving you. Getting a better job offer from somewhere else *will* work. If your boss doesn't give you the raise, he loses you.
In this case, you need to find an alternative that is a viable threat. By "threat," I do not mean angry denunciations or physical intimidation. I mean you need to be able to say to your GM "Listen, this stops, or else X happens." X may be "I leave and join the other group across the hall," or X may be "The other players and I are going to start a different game. You're welcome to play if you want to, but not DM."
3. Negotiate from strength.
Now that you have your alternative, you need to outline what you need. Do it calmly and without accusation. Use "me" words -- don't talk about what the DM is doing, talk about how it makes you feel.
The conversation might go:
"I've noticed that, in the game, everything Player A does turns out great, and everything Player B does is blocked. That makes me feel like players are getting different treatment. I feel like the game is becoming unbalanced because of this. Since I feel this way, I am going to leave / start a new game / take up crocheting, unless this changes."
4. Avoid doing this:
a. Killing the "favorite's" character. This won't work. First, the DM will find a way to stop you. Remember, the DM is god, and this is his pet character. You'll just piss off the "favorite," the DM, and the rest of the party.
b. Getting angry or personal. Telling the DM "You suck because so-and-so is your pet" will just make him defensive and unlikely to change.
c. Not following up. The DM will do two things when you talk to him. He'll deny it's a problem, or he'll promise to change.
If he denies it's a problem, follow up with your alternative. Walk out of the game, and find another one that is better. If he promises to fix it, and doesn't, tell him "Hey, this is what I was talking about. Fix it, or I walk." Then walk.
Good luck!
Carpe