Answer
a. Spring 2. b. Spring 1.
Work Step by Step
a. Here, the force is the same. $F = k_{1}x_{1} = k_{2}x_{2}$. The work done on spring 1 is
$$W_{1} = \frac{1}{2} k_{1}x_{1}^{2}$$
The work on spring 2 is
$$W_{2} = \frac{1}{2} k_{2}x_{2}^{2} = \frac{1}{2} k_{2}\frac{k_{1}^{2} x_{1}^{2}}{ k_{2}^{2}}$$
$$W_{2} = W_{1} \frac{k_{1}}{k_{2}}$$
Because the first spring is stiffer, the work done on spring 2 is greater.
b. Now, the distance stretched is the same.
As before, the work done on spring 1 is
$$W_{1} = \frac{1}{2} k_{1}x^{2}$$
The work on spring 2 is
$$W_{2} = \frac{1}{2} k_{2}x^{2}$$
Because the first spring is stiffer, the work done on spring 1 is greater.