Two equal masses are attached to the ends of a spring of constant k. The two masses are pulled out equally to stretch the spring by x. What is the work done by the spring on each mass?