For the square to fit inside the circle without touching it, the diagonal of the square needs to be less than the diameter of the circle.
Using the Pythagorean theorem we can calculate the diagonal of the square:
X = SQRT(5^2 + 5^2)
X = SQRT(25 + 25)
X = SQRT(50)
X = 7.07
The diagonal of the square is 7.07 cm, which is less than the diameter of the circle, 9cm, so it will fit .