A person is sailing across a circular lake with diameter $4$ miles. He starts at point $X$ and needs to get to point $Y$, which is diametrically opposite to $X$. To get there as quickly as possible, he will sail directly from $X$ to a point $Z$ on the shore and then walk from $Z$ to $Y$ along the rim of the lake. If he can sail at a speed of $2$ miles per hour and can walk $4$ miles per hour, what is the minimum number of hours he needs to make his trip?

Any help would be great!
so you want to minimize the time so how about obtaining an expression of time with only one variable say $\theta$ see the diagram.
now time taken is $$\frac{XZ}{2}+\frac{r\theta}{4} \space\space hours$$
where $r\theta$ is the length of the curve $ZQY$
r is given 2 miles thus our expression becomes $$\frac{XZ}{2}+\frac{\theta}{2} \space\space hours$$
now we need to calculate the length of the path XZ apply cosine rule where The angle ZPX is $\pi -\theta$
$$cos(\pi - \theta)=\frac{r^2+r^2-(XZ)^2}{2rr}$$
$$XZ^2=8(1+Cos\theta)$$ $$XZ=2\sqrt{2(1+Cos\theta)}$$ thus the time taken is$$\sqrt{2(1+Cos\theta)}+\frac{\theta}{2} \space\space hours$$
differentiate it w.r.t. $\theta$ and set equal 0 gives $$cos\theta=-1,\frac{1}{2}$$ where $-1$ gives us minimum value of the time
thus the minimum time taken is $$\frac{\pi}{2} \space hours$$
"So, don't sail at all... walk the whole way along the semicircle.