t = amount of hours it takes to fill the tank.
let's say it takes "t" hours to do the whole tank, and we know the inlet pipe can do the whole tank in 10 hours, so, how much has it done in 1 hour only? well, since it takes 10 hours to do the whole tank, in 1 hour the inlet pipe has only done 1/10 of the whole job.
likewise, the outlet pipe can empty the whole thing in 14 hours, so how much has it emptied in 1 hour alone? well 1/14 of the whole tank.
keeping in mind both have done in 1 hour, only 1/t of the whole thing.
[tex] \bf \stackrel{\textit{total work done so far in 1 hour}}{\stackrel{\textit{inlet pipe's rate}}{\cfrac{1}{10}}~~-~~\stackrel{\textit{outlet pipe's rate}}{\cfrac{1}{14}}~~=~~\stackrel{\textit{work done}}{\cfrac{1}{t}}}
\\\\\\
\cfrac{14-10}{140}=\cfrac{1}{t}\implies \cfrac{4}{140}=\cfrac{1}{t}\implies 4t=140\implies t=\cfrac{140}{4}\implies t=35 [/tex]