Time taken by tap A to fill the cistern = 8 hours.
Time taken by tap B to fill the cistern = 4 hours.
Work done tap A in 1 hour = 1/8
Work done by tap B in 1 hour = ¼
Work done by (A + B) in 1 hour = (1/8 + ¼) = 3/8
Time taken (A + B) to fill the cistern = 8/3 hours = 2 hours 40 min.