Pipe A can fill the tank in 20 minutes, so in 1 minute, it can fill = (1/20)th of the tank.
Pioe B can fill the tank in 30 minutes, so in 1 minute, it can fill = (1/30)th of the tank.
If both pipe used together it can fiill = (1/20) + (1/30) = (3+2)/60 = 5/60 = 1/12th of tank in 1 min
Hence both pipe together will take 12 min to fill the tank fully.