Using the least common multiple method, let the total capacity of the tank be 36 units. Pipe A fills 3 units per hour and pipe B empties 2 units per hour. The tank is full at 8 PM, meaning from 6 AM to 8 PM is 14 hours, during which pipe A works alone to fill the remaining tank after B is closed. If B was closed after y hours, the net fill while both were open was y units, and the remaining (36 minus y) units were filled by A in 14 hours. Setting 36 minus y equal to 3 multiplied by 14 gives y = 6, meaning pipe B was closed at 9 AM.