Assuming the origin is the dock and that 2 PM is t = 0...
The equation of position for boat 1 is y = -10t where 10 is km/hr, t is in hrs, and y is in km
Boat 2 goes 5 km/hr east and reaches the dock at 3PM or t = 1. You can back out that the boat was at x = -5 km at t = 0 and the position of boat 2 is x = -5 + 5t
The distance between the boats is the distance between (0, y1) and (x2, 0)
d = sqrt( (x2 - 0)2 + (0 - y1)2 ) = ((-5 + 5t)2 + (10t)2)1/2
To minimize this, we'll take the derivate with time of d2 to get rid of square root sign and set it to 0:
2(-5 + 5t) (5) + 200t = 0 and solve for t. we know it's a minimum from the 2nd derivative or change of sign of the 1st derivative.
remember that you need to express t in minutes and add to 2 to answer the question.
Good luck and consider hiring a tutor.