Trigonometric functions and solving for sides