The problem is as follows:
At a certain clinic doctor's suggest Kelly to take a diet consisting of $50\,g$ of mueslix each five hours and $40\,g$ of berries each four hours. If she began consuming both kinds of the food suggested and in total she has to take a total of $930 \,g$. How long measured in hours would she need to complete the recommended diet?
The alternatives in the book are as follows:
$\begin{array}{ll} 1.&\textrm{45 hours}\\ 2.&\textrm{42 hours}\\ 3.&\textrm{44 hours}\\ 4.&\textrm{43 hours}\\ 5.&\textrm{40 hours}\\ \end{array}$
What I've attempted to do to solve this problem was to account for the whole treatment as follows:
She began taking the mueslix and the berries at first so she began taking $40+50=90$ grams and it is mentioned in the problem that the dose of mueslix is $50$ grams each five hours and the dose of berries is $40$ grams each four hours, thus $t$ would account for the time in hours.
$40+50+\left(\frac{50}{5}\right)t+\left(\frac{40}{4}\right)t=930$
Solving this $t=42\,h$
However my book indicates that the answer is $44$ hours. What could I be doing wrong?. Can someone help me?.
Interesting word problem, at first I thought this will easy to do with diophantine equation. So I began solving that Linear diophantine equation by two variables and I got two practical combinations of (mueslix,berries) - $(9,12)$ and $(13,7)$ (Not writing the process because that's irrelevant here)
Since, mueslix is taken every 5 hour, so total time would be $9\times5=45$ and for berries $12\times4=48$ hours. However I did a mistake here, I didn't count the initial intake, i.e. I took the amount 0 at first, so subtracting 1 from the ordered pair will do. And hence the correct hours will be $40$ for mueslix and $44$ for berries. Which is the answer.
Your solution is better. But what you couldn't catch is that, the intake is done only in whole amounts, or in other words, 50 g of mueslix adda up only after 5 hours, same for berries.
The function that you made is a linear continuous function, a straight line. It must be discrete. And to obtain that change $\frac{t}{T} \rightarrow \left[\frac{t}{T}\right]$, $T$ denotes the time interval.
The equation becomes, $$40+50 +40\left[\frac{t}{4}\right]+50\left[\frac{t}{5}\right]=930$$ $$4\left[\frac{t}{4}\right]+5\left[\frac{t}{5}\right]=84$$
Rearrange the equation as$$5 \left[\frac{t}{5}\right]=4\left(21-\left[\frac{t}{4}\right] \right)$$
Both sides need to integers, and $\left[\frac{t}{4}\right]<21$ and $t\ge5$ and $\left(21-\left[\frac{t}{4}\right] \right)$ must be a factor of 5.
It can be $20, 15,10$ and $5$. If is $\left[\frac{t}{4}\right]=1$ then $4 \le t <7$ and for this range of $t$, $\left[\frac{t}{5}\right]$ can be just 1.
Can you check all possible cases now?