Let the time it takes pipe B to fill the tank alone be x hours, meaning pipe A takes x plus 6 hours. Since their combined time is 4 hours, the equation for their combined rate is 1 divided by x plus 1 divided by (x plus 6) equals 1 divided by 4. Multiplying by the least common multiple of 4x(x plus 6) and rearranging yields the quadratic equation x squared minus 2x minus 24 equals 0. Factoring this gives (x minus 6)(x plus 4) equals 0, so x equals 6; since pipe A takes x plus 6 hours, it takes 6 plus 6, which equals 12 hours.