Hook's law states that the relationship between the force F applied to a spring and the elongation/compression [tex]\delta x[/tex] of the spring (with respect to its equilibrium position) is
[tex]F=-k \Delta x[/tex]
where k is the spring constant, and the negative sign simply means that the direction of the force is opposite to the displacement.
In our problem, the spring is stretched by
[tex]\Delta x= 18 cm - 10 cm=8 cm=0.08 m[/tex]
And so we can use Hook's law to find the spring constant (we can ignore the sign and consider only the magnitude of the force, 16 N):
[tex]k= \frac{F}{\Delta x}= \frac{16 N}{0.08 m} =200 N/m [/tex]