Question 206806
Previous solution by ptaylor:

Let x=amount of time it takes to empty the tank when both pipes are left open
Then, with both pipes open ,the tank empties at the rate of 1/x tank per min 
Drain pipe empties at the rate of 1/30 tank per min
Inlet pipe fills at the rate of 1/45 tank per min
Then, with both pipes open ,the tank empties at the rate of 1/30-1/45 tank per min 
So, our equation to solve is
1/30-1/45=1/x multiply each term by 90x
3x-2x=90
x=90 min------------------amount of time to empty tank when both pipes are left open 
CK 
In 90 min, inlet pipes pours in 90(1/45) or 2 tanks of water
In 90 min, drain pipe drains 90(1/30) or 3 tanks of water
So the two tanks of water poured in by the inlet pipe in 90 min plus the full tank that was already there equals the 3 tanks that were emptied by the drain pipe. 
Hope this helps---ptaylor 
---------
The water drains faster than the inlet fills - 30 mins to drain, 45 mins to fill, so the net is that the level decreases.
The inlet fills the tank in 45 minutes, so it adds 1/45 of a tank per minute.
The drain empties the tank in 30 minutes, so it loses 1/30 of the tank per minute.
------
Each minute, 1/45 is added and 1/30 is drained.
The amount drained is 1/30, but 1/45 is added. The difference the net, is
1/30 - 1/45 = 1/90.
1/90 of the tank is drained per minute.
--> 90 minutes to empty the tank.