Divide up the octagon as in the diagram.
The octagon is then partitioned into
1 square of area s2 square inches
4 rectangles, each of area s a square inches
4 triangles, each of area a2 square inches
The sum of the areas of these 9 regions is 289 square inches so
s2 + 4 s a + 4 a2 = 289
Use Pythagoras Theorem with triangle PQR to write a as a function of s, substitute into the equation above and solve for s.