This problem is quite similar mathematically. Does that help?
A man in a boat is 3km offshore and wishes to go to a point on the shore that is 5 km from his present position. The man can walk at 4km/h and row at 2km/h. At what point on the shore should he land so that he can reach his destination in the shortest possible time.
This problem is quite similar mathematically. Does that help?