Let the time taken to fill the tank be T.
- Pipe A fills the tank in 4 hours, so in 1 hour it fills \( \frac{1}{4} \) of the tank.
- Pipe B fills the tank in 5 hours, so in 1 hour it fills \( \frac{1}{5} \) of the tank.
Each pipe is turned on after an interval of 1 hour. The total filling time is a combination of the times taken by each pipe at different intervals.
After solving, we get that the total time to fill the tank is 4 hours 24 minutes.