Answer:
Let length of the pool be L.
Deep
A —————————————><———————————----———————————— H
.................(18.5m)
H ——————————————————————————-———><————————- A
..............................................................................................................(10.5)
In same time, Andy covers 18.5 and Hardy covers L - 18.5.
In same time, Andy covers L - 18.5 + 10.5 while Hardy covers 18.5 + L - 10.5
The ratio of these distances covered would be the same since the speeds of both people are constant.
18.5/(L - 18.5) = (L - 8)/(L + 8)
Plug in the options to find that L = 45 works.