a bathtub can be filled by the hot and cold water pipes in four minutes and, when full, can be emptied by the waste pipe in five minutes. If it is half full and all three pipes are set running, when will the tub be filled?

I assume you mean

filled by cold and hot TOGETHER? in 4 min
emptied by drain in 5 min
pipes fill (1/4) tub per min
drain empties (1/5) tub per min
If all are on they fill 1/4 - 1/5
= 1/20 tub/min
(1/20) tub /min * t min = 1/2 tub
t = 20/2 = 10 min