First find the pipe rates. Let pipe B alone need x hours, so pipe A alone needs x − 5 hours. Together they fill the reactor in 6 hours, so 1/(x − 5) + 1/x = 1/6. Combining the left side gives (2x − 5)/(x² − 5x) = 1/6, so 6(2x − 5) = x² − 5x, which simplifies to x² − 17x + 30 = 0, or (x − 15)(x − 2) = 0. The root x = 2 is rejected because it makes pipe A's time negative. So pipe B alone takes 15 hours and pipe A alone takes 10 hours.
Now convert to volumes for clean arithmetic. Take the reactor as 360 liters. Pipe A fills 360 ÷ 10, which is 36 liters per hour; pipe B fills 360 ÷ 15, which is 24 liters per hour; the drain empties 360 ÷ 12, which is 30 liters per hour.
The first stage fills the reactor to half full, leaving 180 liters to go. From the moment pipe B is shut off and the drain opens, only pipe A runs against the drain, so the net rate is 36 − 30, which is 6 liters per hour. The time to add the last 180 liters is 180 ÷ 6, which is 30 hours. So the answer is D.
The wrong choices each drop one feature of the staged finish. 5 uses pipe A's gross 36 liters per hour and ignores the open drain. 6 leaves pipe B running against the drain instead of shutting it off (net 36 + 24 − 30 = 30, and 180 ÷ 30 = 6). 15 is pipe B's alone time, reported by someone who stops at an intermediate quantity rather than the staged duration the question asks for. 60 uses the full 360 liters and forgets the first stage already filled half the reactor.