Answer
$12$ hours.
Work Step by Step
Time taken by first pipe to fill the pool: $3$ hours.
Fraction of the pool filled in one hour $=\frac{1}{3}$.
Time taken by second pipe to empty the pool: $4$ hours.
Fraction of the pool emptied in one hour $=\frac{1}{4}$.
Let's note by $t$ the time it takes to fill the pool under the given conditions.
Fraction of the pool filled in one hour $=\frac{1}{t}$
The equation modelling the given conditions:
$\Rightarrow \frac{1}{3}-\frac{1}{4}=\frac{1}{t}$
The LCD is $12t$
Multiply both side by LCD to clear fractions.
$\Rightarrow 12t\left (\frac{1}{3}-\frac{1}{4}\right)=12t\left (\frac{1}{t}\right)$
Use the distributive property.
$\Rightarrow 12t\left (\frac{1}{3}\right)-12t\left (\frac{1}{4}\right)=12t\left (\frac{1}{t}\right)$
Simplify.
$\Rightarrow 4t-3t=12$
$\Rightarrow t=12$
Hence, it will take $12$ hours to fill the pool.