Below I use JavaScript to solve this equation to get the required answers. Note that you can use the ‘calculator’ below to find the time t given the level y and you also can find the level y at given time t! Anyway please make sure you know how to use your own calculator to solve the SHM equation.
If you fill the boxes with T = 760 minutes, A = 6 m, y = 3, you will get the solution t_{1} = 127 minutes and t_{2} = 633 minutes. The ship has to get in before 02:07pm and leave before 10:33pm.

Copyright 2002 Mohamed S. Kariapper