No, the squares will not finish at 5", if the circles at 5". The diagonal of the square will be 5", so the sides of the square will be 1/2 of the square root of 25. Remember that the 2 right angle sides of a triangle, when squared and added together, will equal the square of the hypotenuse of the triangle.
x squared + x squared = 5 squared
2 (x squared) = 25
x squared = 12.5
x = square root of 12.5 = 3.5 (same as an earlier commenter came up with)