(L - 18.5)/H = 18.5/A --- eqn1
Awesome solution man...just one question. How can you say that Hardy started from the shallow end?
even if we consider the opposite it doesn't affect the final answer as we substitute for A or H and H or A cancels out.
Moreover from answer options we know the midpoint is 22.5 (considering the lowest value of 45 among the answer choices) and since H>A we can intuitively assume that Hardy started from shallow end.
solving it the other way i.e. Hardy is at Deep end initially
Let Length of Pool be L, speed of Hardy be H and that of Andy be A. Given H>A
They 1st pass at a point 18.5m from the deep end
(L - 18.5)/A = 18.5/H --- eqn1
1/A = 18.5/(L - 18.5) H ------eqn2
They cross for 2nd time at a point 10.5m from the shallow end
(L - 10.5)/ A = 10.5/H ----eqn3
now total time spent by both from 1st end to 2nd end ,plus wait period and crossing for second time will be equal i.e.
L/A + 45 + (L - 10.5)/ A = L/H +45 + 10.5/H
on solving this we get
(2L - 10.5)/A = (L+10.5)/H----eqn 4
substituting the value of 1/A from eqn2 in eqn 4 we get
(L + 10.5)/H = (2L -10.5) * 18.5/(L - 18.5) H, on solving this still we get L = 45