In the first 5 hours the tank losses 32000 gallons/hour x 5 hours = <<32000*5=160000>>160000 gallons
In the next 10 hours the tank losses 10,000 gallons/hour x 10 hours = <<10000*10=100000>>100000 gallons
The total amount of water loss so far is 100000+160000 = <<100000+160000=260000>>260000 gallons
The total amount of water remaining in the tank is 350000-260000 = <<350000-260000=90000>>90000 gallons.
Once repaired, after 3 hours, the tank gains 40000 gallons/hour x 3 hours = <<40000*3=120000>>120000 gallons
The total amount of water in the tank after the tank is filled for 3 hours is 120000+90000 = <<120000+90000=210000>>210000 gallons.
The amount of water missing in the tank for it to be full is 350000-210000 = <<350000-210000=140000>>140000 gallons
#### 140000