Me, analytically only.

The question asks for route for the least time, so we find the distance for the least time.

distance = rate*time,

So, time = distance / rate -----------**

Rates are given, so we find distances.

Let x = BP, in km.

So, 6-x = PC, in km.

In right triangle ABP, by Pythagorean theorem,

AB = sqrt(4^2 +x^2) = sqrt(16 +x^2)

Then, the times,

Let T = total time spent from A to P to C,

T = [sqrt(16 +x^2) / 5] +(6-x)/8 -------------------------(i)

Differentiate both sides with respect to x,

dT/dx = (1/5)[(1/2)(2x /sqrt(16 +x^2))] +(1/8)[-1]

dT/dx = (1/5)[x /sqrt(16 +x^2)] -1/8

Equate dT/dx to zero,

0 = (1/5)[x/sqrt(16 +x^2)] -1/8

Clear the fractions, multiply both sides by 5*8*sqrt(16 +x^2).

0 = 8x -5sqrt(16 +x^2)

sqrt(16 +x^2) = 8x/5

sqrt(16 +x^2) = 1.6x

Square both sides,

16 +x^2 = (2.56)x^2

16 = (1.56)x^2

x^2 = 16/1.56 = 10.2564

x = sqrt(10.2564) = 3.20256 km -----------for least T.

Hence, for the route, or distance of the route, when x = 3.20256 km,

D = sqrt(16 +x^2) +(6-x)

D = sqrt(16 +10.2564) +(6 -3.20256)

D = 7.92 km. ---------------------------answer.