Answer
$x=\displaystyle \frac{ab}{b-a}$
Work Step by Step
In 1 hour,
pipe 1 fills $\displaystyle \frac{1}{a}$ of the (full) pool,
pipe 2 drains $\displaystyle \frac{1}{b}$ of the pool.
In $x$ hours, they fill $(\displaystyle \frac{x}{a}-\frac{x}{b})$ of the pool.
We want t for which $\displaystyle \frac{1}{1}$ of the pool is full (the whole job).
$\displaystyle \frac{x}{a}-\frac{x}{b}=1\qquad$... multiply with $ab$
$bx-ax=ab$
$x(b-a)=ab$
$x=\displaystyle \frac{ab}{b-a}$