This figure is a regular octagon. What is the value of x and what is the value of y?

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
[tex]x=135\text{ dgr}[/tex]Furthermore, we can notice that x° has the same value as the supplementary angle to y°. In a drawing:
So,
[tex]\begin{gathered} x+y=180\text{dgr} \\ \Rightarrow y=180-135=45dgr \end{gathered}[/tex]