Answer:
the spring will stretch 10 cm
Step-by-step explanation:
With the 40 N mass hanging from it, the restorative force of the spring will equal 40 N.
Let's recall that the restorative force "F" of the spring has a magnitude proportional to the displacement "x" from its relax position as per the following formula:
where "k" is the spring's constant.
We can from this expression find the value of the displacement "x" just solving for it in the equation:

Such displacement is equivalent to 10 cm.