I've attached a diagram as you requested.
Let d be the distance between the 2 boats.
Let t be the time the boats traveled since the powerboat passed the buoy.
Use Pythagorian rule:
. Expand the brackets and collect equal powers:
. d² has a minimum if d has a minimum. Thus it is sufficient if you calculate the minimum of d² = D
. D'(t) = 0 if
That means after 7/25 hours = 16 min 48 s, the distance is a minimum. Plugin this value for t and calculate d.
d = 24 km