✔ 最佳答案
Surely, the extnesion is x.
The force at one end of the string keeps the spring in stationary. Withou this force, you would not be able to extend the spring because it (the spring) would move along with the force when it is pulled.
When one end of the spring is fixed on a wall, the force F that keeps the spring stationary is actually given by the wall.