I would look at one 3 minute cycle:

minute 1: A is open, B is closed, C is closed. Thus 1/20 of the cistern is filled.

minute 2: A is closed, B is open, C is closed. Thus 1/30 of the cistern is filled.

minute 3: A is closed, B is closed, C is open. Thus 1/15 of the cistern is drained.

During this cycle, we have a net increase of 1/20 + 1/30 - 1/15 = 1/60

After the 55th cycle we have 11/12 of the cistern filled, so we only need an additional 2 minutes of the next cycle to fill it for a total of 167 minutes.