Easy, just use the Pythagorean theorem. It states that for a right triangle, two legs both squared and summed equals the hypotenuse squared. A wider angle makes way to a longer hypotenuse, so our theorem is adjusted:

We then have...

and...

BTW, I don't understand from the drawing how two sides are equal (5x)? Nevertheless, I will continue with the algebra.