Correct option is B
Given:
Pipe A fills the tank in 7 hours
Pipe B empties the tank in 9 hours
Required work = of the tank.
Solution:
work rate = per hour.
work rate = - per hour.
Net rate when both are open =
Net rate = per hour
Time = = 21 hours
Alternate Method:

Time taken to fill the tank =
Required work = of the tank = 21 hours