Spring B will do more work.
Work Step by Step
Spring Force= K$\times$Distance Work=Force$\times$ Distance ---Force is constant so the spring with the greater distance will do more work. Spring B has a smaller K than spring A, so it must have a greater distance to get the same force. Since spring B has a greater distance(and same force), it does more work.