Since you add $\frac{1}{20}+\frac{1}{30}$ before subtracting $\frac{1}{15}$, it is sensible to see how long it takes to fill $1-\frac{1}{20}-\frac{1}{30}$ of the tank using the three steps.
This is $\frac{11}{12}=\frac{55}{60}$ of the tank and so takes $55 \times 3 = 165$ minutes.
You then add $\frac{1}{20}$ in the $166$th minute and $\frac{1}{30}$ in the $167$th minute to reach a full tank, so the answer is $167$ minutes.