Since the downward path, the surface and the depth required forms a right triangle together, we can use the 3 trigonometric functions in physics. If any of the 2 variables are given, we can estimate the measurement of the missing one using the SOH CAH TOA. In this case, SOH was used.
Since the path of the submarine forms a right triangle, if 2 of the variables are given, you can solve for any of the missing variables of the triangle using the 3 trigonometric functions known as SOH CAH TOA.