Let waste pipe empty in x minutes (rate = 1/x per minute). Cold fills at 1/20 per minute, hot at 1/30 per minute. Combined fill rate = 1/20 + 1/30 - 1/x = 5/60 - 1/x. The tub should be full in 1/(1/20+1/30) = 12 minutes with all three pipes working normally. But when waste is open, it takes 12 + 6 = 18 minutes to fill. In those 18 minutes, actual fill occurred at rate (1/20 + 1/30) for full time, minus waste effect for 12 minutes. Actually: (1/20 + 1/30) × 18 - (1/x) × 12 = 1 (full tub). So 3/60 × 18 - 12/x = 1, giving 9/10 - 12/x = 1, so -12/x = 1/10, x = -120. That's wrong. Let me reconsider: The person expected tub to be full in 12 min (1/20+1/30=5/60=1/12). But when he returns, waste pipe has been open the whole time. In those 12 minutes, some water drained. Then he closes waste and it takes 6 more minutes to fill. In first 12 min: (1/20+1/30-1/x) × 12 = some fraction filled. Then in next 6 min: (1/20+1/30) × 6 = 6/12 = 1/2 fills remaining half. So first 12 min filled 1/2: (5/60-1/x) × 12 = 1/2. So 1 - 12/x = 1/2, giving 12/x = 1/2, x = 24 minutes. ✓