If you apply a force of 5N to one side of a spring, and 5N to the other side, then the spring will compress according to F=kX. If K=1, then X=5m. This is similar to what happens when you apply a force of 5N to a spring attached to a wall, right? the wall applies an equal and opposite force back since the spring is not accelerating. But if you apply the force on your own to both sides, how do you know which side compresses? And does the same result occur? Whereby you only consider the compression of one side with the 5N and ignore the 5N applied to the other side (since its used to prevent translational motion)?