Ok, so if I understood you correctly.
Because we know the direction of the forces, we take the absolute value of the displacements s0 and s1, because Fspring = k * (Displacement), and we already know which direction the force is going into, so it's to no interest to us to take the signed...