The sum of the potential energy and kinetic energy (i.e. mechanical energy) of a system of particles remains constant during the motion, under the action of the conservative forces.
Work done = change in its kinetic energy
W = Ek2 - Ek1 (1)
Work done is equal to negative change of potential energy
W = -(Ep2 - Ep1) (2)
We'll put (1) = (2):
Ek2 - Ek1 = -(Ep2 - Ep1)
Ek2 + Ep2 = Ek1 + Ep1