A team of 5 firefighters with hoses can deliver 5 * 20 = <<5*20=100>>100 gallons of water per minute.
To deliver 4000 gallons, this team will take 4000/100 = <<4000/100=40>>40 minutes to extinguish the fire.
#### 40