Answer
$4\frac{5}{8}\ hours$
Work Step by Step
Step 1. The inlet pipe would fill $1/5$ of the pool per hour.
Step 2. The outlet pipe would empty $1/8$ of the pool per hour.
Step 3. Together, they would fill $1/5-1/8=3/40$ of the pool per hour.
Step 4. After one hour, the pool would be $1-3/40=37/40$ empty.
Step 5. It will take the inlet pipe $5(\frac{37}{40})=\frac{37}{8}=4\frac{5}{8}\ hours$ to fill the rest.