ElectricPavlov nice solution!
Solution for 2:
Since the perimeter of the square is \(2\sqrt{2}\), the side length of one side of the square is \(\frac{\sqrt{2}}{2}\). The diagonal of that square is then equal to \(\frac{\sqrt{2}}{2} \cdot \sqrt{2} = 1\)
Let x be the radius of one circle, and let y be the radius of the other circle.
Notice that the diagonal is equal to \(x\sqrt{2} + x + y\sqrt{2} + y\). Therefore,
\(x\sqrt{2} + x + y\sqrt{2} + y = 1\\ x(\sqrt{2}+1)+ y(\sqrt{2}+1)=1\\ x+y=\frac{1}{\sqrt{2}+1} = \sqrt{2}-1\)
Since the sum of the circumference of the circle is 2 times the radius times pi, just multiply 2pi to get the final answer:
\(\boxed{2\sqrt{2}\pi-2\pi}\)
.