Time taken by inlet pipe to fill swimming pool=9 hr
time taken by outlet pipe to fill swimming pool=12 hr
work done by inlet pipe in 1 hr=1/9
work done by outlet pipe in 1 hr=1/12
work done by inlet and outlet pipe in 1 hr=1/9-1/12
Therefore, time taken by inlet and outlet pipe to complete the work is 36 hours.