Let's assume the tub holds 100 gallons (This is strictly arbitrary... could use any reasonable value)
Then, to fill the tub in half an hour means 100 gallons/.5 hour = 200 gallons/hour
Then, to fill the tub in one hour means the rate is 100 gallons/ hour
Working together, the rate is 300 gallons/hour.
So, 100 gallons/(300 gallons/hour) = 1/3 hour to fill the tub if both run together