Inlet Pipe:
24 hours to fill up
So,
1/24 filled up PER HOUR
Outlet Pipe:
28 hours to empty
So,
1/28th empty PER HOUR
First, 6 hours, both were on, so fraction of reservoir that filled up would be:
[tex]\begin{gathered} 6(\frac{1}{24}-\frac{1}{28}) \\ =6(\frac{28-24}{672}) \\ =6(\frac{4}{672}) \\ =\frac{24}{672} \\ =\frac{1}{28} \end{gathered}[/tex]In these 6 hours, only 1/28th of the reservoir was filled up.
Now,
We have remaining: 1 - (1/28) = 27/28th of the reservoir to fill up
It fills up by inlet pipe, which has a rate of 1/24 PER HOUR.
So, the total time it will take:
[tex]\frac{27}{28}=\frac{1}{24}t[/tex]where t is the remaining time it will take. So, we solve for t:
[tex]\begin{gathered} \frac{27}{28}=\frac{1}{24}t \\ t=\frac{\frac{27}{28}}{\frac{1}{24}}=\frac{27}{28}\times\frac{24}{1}=\frac{648}{28}=23\frac{1}{7}\text{hours} \end{gathered}[/tex]So, total time it takes to fill up the reservoir is:
[tex]23\frac{1}{7}+6=29\frac{1}{7}\text{ hours}[/tex]