The elastic potential energy of the spring will be two times greater than the gravitational potential energy of the object. This is because the elastic potential energy of a spring is proportional to the square of its displacement, while the gravitational potential energy of an object is proportional to its height. When the distances are doubled, the height of the object will be doubled, resulting in a doubling of its potential energy. However, the displacement of the spring will also be doubled, resulting in a four-fold increase in its elastic potential energy. Therefore, the elastic potential energy of the spring will be two times greater than the gravitational potential energy of the object.