Question 773264
This set of steps really needs a drawing to make clear what it means, but
The side of the square is made of {{{a+x +x}}}, where x is the unknown length leg of one of the 45-45-90 triangles.  Hypotenuse of the 45-45-90 triangle is also length a.  Pythagorean Theorem gives us {{{x^2+x^2=a^2}}},
{{{2x^2=a^2}}}
{{{x^2=(1/2)a^2}}}
{{{x=a*sqrt(1/2)}}}
{{{x=(a/2)sqrt(2)}}}

Side of square is then {{{a+2x=a+a*sqrt(2)}}}



----this picture is not finished-----
____near top of octagon________
not drawn to scale
{{{drawing(400,400,0,20,0,20,
triangle(3,18,6,18,3,15),
line(6,18,12,18),
triangle(12,18,15,18,15,15),
locate(5.0,16.5,a),
locate(9,17.7,a),
locate(4.5,18.6,x),
locate(2.5,17,x))}}}