Step 1: Find the rates of A and B.
Pipe A can fill the tank in 20 minutes, so its rate is:
\[
\text{Rate of A} = \frac{1}{20} \text{ tank per minute}.
\]
Pipe B can fill the tank in 30 minutes, so its rate is:
\[
\text{Rate of B} = \frac{1}{30} \text{ tank per minute}.
\]
Step 2: Find the combined rate.
The combined rate when both pipes are open is the sum of their individual rates:
\[
\text{Combined rate} = \frac{1}{20} + \frac{1}{30}.
\]
Find the LCM of 20 and 30:
\[
\text{LCM}(20, 30) = 60.
\]
So,
\[
\text{Combined rate} = \frac{3}{60} + \frac{2}{60} = \frac{5}{60} = \frac{1}{12}.
\]
Step 3: Time taken to fill the tank.
The time taken to fill the tank is the reciprocal of the combined rate:
\[
\text{Time} = \frac{1}{\frac{1}{12}} = 12 \text{ minutes}.
\]