The student who displaced the spring by 2 cm has less potential energy than the student who displaced the spring by 4 cm, this is because potential energy (elastic) is directly proportionate to extension (displaced amount), so as the amount of displacement of the spring is higher, then the potential energy of the springs is higher and vice versa.