Two tubes A and B can fill a swimming pool in 12 and 24 hours respectively. If both the pipes are used together, then how long will it take to fill the tank?
A. 6 hours
B. 8 hours
C. 4 hours
D. 9 hours