Formula for calculating rate drain A question which I am having difficulty with is:

A tank is 3/4 full. Fillpipe A can fill the tank in 12 min. Drainpipe B can empty the tank in 8 min. If both pipes are open, how long will it take to empty the tank?

The answer is 18 min.
Is there a specific formula for such questions? Since both the pipes are open I am confused on how to work through this.
Here is what i tried so far:
3/4 of tank fills in 9 minutes.
3/4 of tank drain in 6 minutes.
so (1/9) + (1/6) = 5/18
Thus 5/18 part of the job (fill and drain together.. make sense?) is done in one minute
and one job is done in : 18/5 = 3.6 minutes..

The trick with all such questions is to convert the information about the fill and empty rates from the form you get, which is in units of minutes per tank, or in general $\frac{\rm time}{\rm volume}$, to the reciprocal units of $\frac{\rm volume}{\rm time}$, in this case tanks per minute, because such units can be added and subtracted.  
For example, if you have one man who digs a hole in two days and another who digs a hole in three days, you convert the units of $\frac{\rm days}{\rm holes}$ to the reciprocal $\frac{\rm holes}{\rm day}$: we are given that the first man digs at a rate of $\frac{\rm 2\ days}{\rm 1\ hole}$, and when we take the reciprocal we get that the first man digs $\frac{\rm1\ hole}{\rm2\ days} = \frac12\frac{\rm holes}{\rm day}$. Similarly the second man digs $\frac13$ holes per day. Working together, they can dig $\frac12 + \frac13 = \frac 56$ holes per day, and therefore they take $\frac65$ days to dig one hole together.
You can easily convert this technique into a formula for adding rates, but I find it more natural to just convert the units.
Spoiler below.

 $A$ fills at a rate of $\frac1{12}$ tanks per minute; $B$ empties at a rate of $\frac18$ tanks per minute.  The net rate of filling is $A-B = \frac1{12} - \frac18 = -\frac1{24}$ tanks per minute.  If the tank were full, it would empty in 24 minutes, but it is only $\frac34$ full, so it empties in only $\frac34\cdot 24 = 18$ minutes.

