First pipe can fill a tank in = 20 minutes
In one minute it can fill = 1/20 th of the tank
Second pipe can fill a tank in = 30 minutes
In one minute it can fill = 1/30 th of the tank
Both together can fill = 1/20 + 1/30 = 5/60 = 1/12 th of the tank in one minute
Hence both pipe together will take 12 minutes to fill the tank completely.