Looking at your FBD above, which forces, if any, do work that is not a part of the potential energy of the system? If there are none, then energy is conserved. Write down the individual contributions ...