Part filled in 10 hours = 10 x (1/15 + 1/20 - 1/25) = 23/30
Remaining part = (1 - 23/30) = 7/30
Now, (1/15 + 1/20) part is filled by A and B in 1 hr.
7/30 part be filled them in (60/7) x (7/30) = 2 hrs.
∴ Total time taken to fill the tank = (10 + 2) hrs. = 12 hrs.