Simplifying trigonometric ratios and finding the value of x