Initial position= +25
Now object goes towards 40 m in positive X direction.
Now New position= +25 +40=+65
Now the object changes its direction in opposite direction
and covers 50 m in 10 seconds.
So New position=+65-50=+15
Now the object is 10 meter left from its initial position.