how to solve simple trigonometric problem