to a):

Use the definition of Cosine:

to b):

If P = L then

to c)

If x = 0 then d = w

if then

Therefore

to d)

I'll leave this part for you.

to e):

That depends on how fast the life-guard is able to run or to swim.

Maxiumum way to run = 3w

Maximum way to swim =

Let denote the running speed and the swimming speed then the lifeguard will swim if