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:
The solution is the time t for which:
which is 60 minutes.