They have the derivation here
The figure is
In this derivation the second line is $ a^2 = b^2 + b^2 $ .How have they assumed $ AB = AC $ ? . Is this assumption based on some vision ? . Why I am asking this is , because the problem is to find smallest square fitted outside the hexagon . If I am given this question in exam how will this point $AB= AC $ strike my brain for this case ? I will try to go with general case $AB \neq AC $ and solve . But this will make the calculation a bit tough as the number of unknowns is 1 more . So is there a vision or wisdom behind this guess . Am I missing something ?
Second question is on what basis did they start with this figure , because both are regular polygons the first image which struck my mind was something like
Am I missing something .