The diagram is a hat box that is designed with the shape of a regular octagon inside and a rectangle outside. Find the value of x.

A) 45 B)67.5 C)60 D)55