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.