First, to maximise the chance of detecting crass blunders, make an estimate of the MINIMUM time.
If there were NO drainage from the bottom, the time would be 4 * (0.5 - 0.1) / 0.08. This is 20 seconds.
The inflow is 0.08 - 0.12h, so the rate of increase of h is (0.08 - 0.12h) / 4.
dh/dt = 0.02 - 0.03h
To improve on the estimate of minimum time above, we can think about the rate at which the height is increasing at the beginning and end of the filling.
When h is 0.1 dh/dt = 0.02 - 0.03 * 0.1 = 0.017
At this value of dh/dt, the time taken would be 0.4 / 0.017 = 23.5 seconds
When h = 0.5, dh/dt = 0.02 - 0.03 * 0.5 = 0.005
At this value of dh/dt, the time taken would be 0.4 / 0.005 = 80 seconds
So we know that the answer we are looking for is /somewhere/ near the middle of the range from 23 to 80.
To find the actual answer:
dh/dt = 0.02 - 0.03h
so
dt = dh/(0.02 - 0.03h)
The integral of 1 / (a + b*x) is 1/b * ln(a + b*x)
[Note: ln is Napierian logarithm, that is, to the base e]
so the integral of 1 / (0.02 - 0.03h) is -1/0.03 * ln(0.02 - 0.03h)
so t2 - t1 = -1/0.03 * ( ln(0.02 - 0.03*h2) - ln(0.02 - 0.03*h1) )
so that
t2 - t1 = 1/0.03 * ( ln(0.02 - 0.03*h1) - ln(0.02 - 0.03*h2) )
so that
t2 - t1 = 1/0.03 * ln(0.017/0.005)
and so
t2 - t1 = 40.8 seconds