The second answer is incorrect.

Look at the graph of the function. The solid red line is the water depth over time, the dotted red line is the average water depth, and the dotted blue line is the water depth at 25 ft.

The solid blue lines indicate the times when the water depth is 25 m.

How do we solve for t here?

35 + 15*cos(0.5*t) = 25

15*cos(0.5*t) = -10

cos(0.5*t) = -10/15 = -2/3

0.5*t = cos^(-1)[-2/3] <-- cos^(-1) is the inverse cosine function

t = 2*cos^(-1)[-2/3] (approximately) -1.68214 (Make sure your calculator is in "radian" mode.)

Now, a negative t is outside our domain. The wavelength of this cycle is 4(pi) hours (not 2(pi) due to the "0.5" inside the cosine function), but cosine will return to the same value every half cycle. So add 2(pi) to this result:

t = 4.60105 hr. (I'll show you how to get this in terms of hours and minutes later.)

How to get the other solution? Well, whoever did the problem simply added another 2(pi) to get to the next cycle, but as you can see there is an earlier solution around 8 hours. Now, the cosine function is symmetric about its minimum point, here t = 2(pi) hrs (indicated by the dotted purple line). So there is a time difference of 2(*pi) hr - 4.60105 hr = 1.68214 hr between the first 25 ft depth and the minimum, so there will be another 25 ft depth at 2(pi) + 1.68214 hr = 7.96532 hr.

Thus the 25 ft depth is at

t = 4.60105 hr <-- Boat needs to leave the harbor

t = 7.95632 hr <-- Boat can return to harbor

To convert these to hours and minutes:

Let's consider the 4.60105 hr time. Obviously the whole hours will be 4, so we need to convert 0.60105 hr to minutes. Simply multiply by 60:

60*0.60105 = 36.0629

Thus t = 4.60105 hr = 4 hr 36 min = 04:36

Similarly, t = 7.96532 hr = 07:58

-Dan