The first pipe fills the tank at a rate of 1/20 of a tank/min

The second pipe fills the tank at a rate of 1/30 of a tank/min

The third pipe empties the tank at a rate of 1/15 of a tank/min.

Starting from empty the content of the tank at time t is:

t(1/20+1/30-1/15).

The solution is the time t for which:

t(1/20+1/30-1/15)=1,

which is 60 minutes.

RonL