What is the formula of getting the potential and kinetic energy?