What is the relation between potential energy and kinetic energy ?
If there is no friction on the system, mechanical energy doesn’t change in time. So, since the mechanical energy is conserved, sum of potential and kinetic energy will be kept constant.