Q:

Real life water bill problem (want to check myself)

4 roommates are living in an apartment, then 2 of them leave. After 49 days, the remaining 2 get the water bill. The bill includes a period of 15 days where 4 roommates lived in the apartment. So 15 days of water for 4 people and 49 days for 2 people. How much should each roommate pay? The problem is that 2 people use less water then 4 people so if they just split the bill, the 4 people are paying less than they should. 
My solution which I'm not sure is correct: Say 1 person uses 1 Dollar worth of water per day, So the 4 roommates used 60 Dollars worth of water, and the 2 roommates used 98 Dollar. So They need to split the bill to 158, The 4 roommates should pay 60 parts of it and the 2 roommates should pay 98 parts of it. But I'm not sure it takes everything into account.
Any help appreciated. Thanks

A:

Say each person uses the same amount of water per day, call it $1$ unit.
Then for the first $15$ days, you used $15$ units per person and $60$ units total. For the next $49$ days, you used $49$ units per person and $98$ units total. All in all, everyone used $158$ units during the entire billing cycle. What's each person's share?

For those who left early: $\frac{15}{158} \approx 9.5\%$.
For those who stayed: $\frac{15+49}{158} \approx 40.5\%$.

