Calculating values based on different factors First of all apologies, this is not a complex mathematical problem (I don't think) but I could not find any active math forums out there.
I am having difficulties coming up with a formula. Lets say I am running a restaurant, and I have 3 employees. The tips for the week is $\$600$.
Employee A is entitled to $60\%$ of the tips because they have more responsibility. Employees B and C are entitled to $40\%$ of the tips.
So with this assumption, Employee A would get $\$360$ and Employees B and C would get $\$120$ each.
That's simple enough, but we also need to take hours worked into account. Lets say employee A worked $20$ hours that week, but Employees $B$ and $C$ worked $40$ hours. So if we done it based on hours, Employee A would get $(600/100)*20=\$120$, whilst the other 2 got $\$240$ each.
Now the question is whether there is a way to combine the two? So Employee A has more responsibility, so should get more per hour from the tips. So on equal terms, $\$600/100\text{ total hours}=\$6$ per hour worked.
Now I don't know if this is right, but to change this figure, I done

$\$6+60\%=\$9.6$
$\$6-40\%=\$2.4$

But this seems like too much of a difference now between the two, and when I apply this to hours worked for all employees it does not add up to $\$600$.
I hope I am making this clear, quite difficult to explain, but I am trying to distribute tips based on hours worked and percentage of responsibility.
What would be the best way to achieve this?
 A: Let $x$ (dollars) be one "unit" of tips, so to speak. It's unknown for now, but we will set up a reasonable equation to find it, and then we will be able to determine everybody's share of tips.
Your first condition says that if they worked the same hours, A must receive more than B or C in the ratio of $60:40$. So we'll say that per hour A receives $0.6x$ dollars and B or C each receive $0.4x$ dollars.
Then we simply need to multiply these pay rates by the hours that each employee worked. For example: if A worked $20$ hours, then he should receive $0.6x\times20=12x$ dollars; and if B and C worked $40$ hours each, then they should receive $0.4x\times40=16x$ dollars each.
So the total tips, if we distribute them proportionally both to the employee's responsibility (reflected in pay rates) and hours, amount to $12x+16x+16x$. Since the total amount of tips is $\$600$, we get the equation
$$12x+16x+16x=600 \implies 44x=600 \implies x=\frac{600}{44}\approx\$13.64.$$
That's one "unit" of tips. And then each employee will get their respective portion: A gets $12x\approx\$163.64$, and B and C get $16x\approx\$218.18$ each.
Luckily, the total is $163.64+\$218.18+\$218.18=\$600$ precisely! In general, because of rounding, it may be a cent or a few cents off.
