An important characteristic of octagons, and similarly to any regular polygon, is that their internal angles are the same and, moreover, they have a particular measure depending on the number of sides.
In the case of an octagon, each one of its internal angles is 135°
So, using this fact, notice that
Furthermore, we can notice that x° has the same value as the supplementary angle to y°. In a drawing:
So,