Step-by-step explanation:
The energy required to stretch a spring a distance x is:
E = ½ kx²
where k is the stiffness constant.
If spring B has a constant k and is stretched a distance of b:
E = ½ k b²
If spring A has a constant of 4k and is stretched a distance of a:
E = ½ (4k) a²
E = 2 k a²
If the energies are the same:
½ k b² = 2 k a²
b² = 4 a²
b = 2a
So spring B is stretched twice as far as spring A.