in a regular octagon all the interior angles are of the same value.
sum of the interior angles in octagon = (n-2) *180°
n - number of sides, in this case, n = 8
interior angles sum = (8-2)*180° = 6*180° = 1080°
since there are 8 equal angles = 1080/8 = 135°
Angle x + one interior angle of the octagon = 180 ° (as its a straight line)
x + 135 = 180
x = 45°