$M is just sufficient to pay for the wages of one qualified teacher for x days or the wages of one relief teacher for y days. For how many days will $M be sufficient to pay for the wages of one qualified teacher and one relief teacher? Give your answer in terms of x and y.

2 answers

Okay... you've got $M, and you can afford one qualified teacher for x days, so a qualified teacher costs M/x dollars per day. Alternatively, you can afford a relief teacher for y days, so a relief teacher costs M/y dollars per day. So, if you're paying for one qualified teacher AND one relief teacher, you'll be spending (M/x + M/y) dollars per day, yes? That's M(1/x + 1/y) = M(x+y)/xy dollars per day. But you've only got $M to spend in total, so the number of days you'll have them both for must be $M divided by $M(x+y)/xy. The $Ms cancel out, leaving 1 / ((x+y)/xy) = xy / (x + y). That's my answer.

Now do a quick sanity check on that. Suppose a relief teacher costs almost nothing. Then you can afford one for a very long time, so y is extremely large. xy/(x+y) = x/(1+x/y), and as y increases without limit, this expression tends to x, which is the amount of time you can afford one qualified teacher - and that makes sense. Now suppose they cost the same. That would be like having two qualified teachers, the amount of time for which will be (x^2)/(2x) = x/2. That makes sense also - so I reckon we've got it right.
Qualified teacher cost= M/x per day
Relief teacher cost = M/y per day
So,
= M(1/x + 1/y)
= xy/x+y