The simplest way to handle this is for you to rent the apartment and sublet to the girlfriend and friend. I'd split the utilities evenly, one-third from each. The reason for this is that each of you contribute evenly to generating the utility bills. It's not like your income makes the water cost more for you.
Utilities are driven by usage. Dividing them other than equally is likely to lead to more problems than it solves. Also, it seems unlikely that a different apartment would use significantly different water, electricity, or internet. Those are driven by the appliances rather than the size or location of the apartment. Only pay more for the utilities if you want something that they don't. For example, maybe you want HBO, etc. It would be reasonable for you to pay the entire premium if that's a luxury that they simply wouldn't buy.
I'd also divide the groceries evenly if you share and share alike. If you eat separate meals, you can buy separate groceries.
If the rent can't be split evenly but you could afford it alone, then you can just sign up for it. If you break up with the girlfriend and/or the friend moves out, you're still fine. You have your fancy apartment and can afford it.
The bigger problem comes if you can't afford the apartment without both the girlfriend and friend contributing. If so, you should probably avoid this situation. It's fragile. Any person leaving would put you in a financially untenable position. You can look for a new tenant to replace your friend, but you can't exactly rely on getting a new move-in girlfriend on demand.
Neither the girlfriend nor the friend can afford to be on the main lease. In case of emergency or tragedy, they couldn't replace you as a tenant. That's why they should sublet. Then their obligation is to you, not to the landlord.
How much apartment would the girlfriend and friend get if you weren't involved? What rents would they pay? That's probably how much rent they should pay for this apartment. You want a better apartment (or a better location)? That's on you.
You should only do this if you want to do it. If you want to share apartments with the girlfriend and friend, then do so. Work out something equitable. If you plan on moving in together to reduce your costs, then you don't sound like you are compatible. Obviously there are reasons to move in with the girlfriend aside from costs. Why can't the friend get his or her own place? The added rent probably won't do more than pay for the added room (you could get a one bedroom without the friend).
That points to an alternative way of calculating the friend's contribution: the difference between a two bedroom and a one bedroom apartment. That's the additional cost of the bigger apartment. If the friend can't afford that, then this might not be a good idea.
Summary
Make sure that you can afford the apartment if one or both of the friend and girlfriend move out. You can eventually replace the friend as the tenant but don't rely on doing the same with the girlfriend. Share utilities evenly. Possibly groceries too. The friend should pay at least the added cost of the additional bedroom. Don't expect either to pay more in the new apartment than they would pay without you. You should be the only one on the main lease; sublet to them.