When a spring is compressed or elongated by a length x, the potential energy generated in the spring is equal to (1/2)*k*x^2. The object here is placed between two walls and connected to both of them using springs with a spring constant of 2 N/m and 5 N/m respectively.
If the object is moved from its equilibrium position in either direction, one of the springs is compressed while the other is stretched. This generates a potential energy in both of them.
The work that has to be done to move the object is the sum of the potential energy generated in both the springs.
As the object is moved 25 cm, the potential energy in both the springs is (1/2)*2*0.25^2 + (1/2)*5*0.25^2 = 0.21875 J
The work required to move the object by 25 cm in either direction is 0.21875 J.