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:

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:

where t is the remaining time it will take. So, we solve for t:

So, total time it takes to fill up the reservoir is:
