Closest Points

Consider a port at point A, and the Miyajima shrine at point P. The ship R will be moving with the given direction. On the right, shows the distance from the ship R and the shrine P. Move point R, to visualize the ship's movement. Can you find what time the ship is closest to the shrine?