The problem is as follows:

Louis took three and a half type $A$ pills every twelve hours and a

half type $B$ pills every $6$ hours. He did this until the difference

in the number of pills taken was $25$. If he starts taking both types

of pills together, how long does the treatment last and how many pills

had he taken in total?.

The alternatives given in my book are as follows:

$begin{array}{ll}

1.&textrm{4.75 days and 44 pills}\

2.&textrm{4.75 days and 45 pills}\

3.&textrm{3.75 days and 43 pills}\

4.&textrm{4.5 days and 45 pills}\

end{array}$

How exactly should I solve this problem?.

What I’ve attempted so far was to use this formula which is based on the fact that the number of pills taken can be found by computing the division of the total time with that of the interval between each dose plus $1$ which guarantees to account all together and without falling in the off by one error.

Thus the labels are as follows:

$t_{1}$: total elapsed time

$t_{2}$: interval time between dose

$textrm{total of A pills: a}$

$textrm{total of B pills: b}$

$left(3+frac{1}{2}right)left(frac{t_1}{t_2}+1right)=a$

$left(frac{1}{2}right)left(frac{t_1}{t_2}+1right)=b$

$a-b=8$

Replacing with the given information:

$left(3+frac{1}{2}right)left(frac{t_1}{12}+1right)=a$

$left(frac{1}{2}right)left(frac{t_1}{6}+1right)=b$

$left(3+frac{1}{2}right)left(frac{t_1}{12}+1right)-left(frac{1}{2}right)left(frac{t_1}{6}+1right)=25$

Then solving this yields:

$t=frac{528}{5}$

But this number is not an integer and it doesn’t seem to help me to get the requested time. Thus I need help in the right approach for this question. Can someone help me here? It would help me a lot a wordy answer so I can understand what is going on.