The first hose pumps out water at a rate of
(161 gal)/(3 h) = 161/3 gal/h
The second hose fills the pool at a rate of
(161 gal)/(2 h) = 161/2 gal/h
Working together, they can fill the pool at a rate of
(161/3 + 161/2) gal/h = 805/6 gal/h
so that it would take
(161 gal) / (805/6 gal/h) = 161×6/805 h = 6/5 h = 1.2 h = 1 h 12 min
to fill the pool.