Let the leak empties it in T hours
From the given rule, we have (T x 30) / (T - 30) = 40
∴ T = 120 minutes = 2 hours.
Now, from the question, applying the rule, we have time taken by B to fill the tank when crack in the bottom develops
= (120 x 40) / (120 - 40) = 60 minutes = 1 hour