The average kinetic energy of a substance is directly proportional to the temperature of that substance.
![Mathematically\ Kinetic\ energy [K.E]\ \alpha\ T](https://img.qammunity.org/2019/formulas/physics/college/l2l34aidu4vkj90fz79ljwffzu2q3377b9.png)
Here T is the temperature.
During the process of change of state,the temperature of the system remains constant as long one substance is not converted into another substance. It means that the energy absorbed or released at that time is utilised in changing the state of substance only. As kinetic energy is constant,so gain or loss of energy is attributed to potential energy.
In the given question,the water is converted from solid to liquid. During the melting of ice, heat is given to the ice for converting into liquid. The energy given is called latent heat which is nothing else than the gain of potential energy of water.
Hence water in liquid form has more potential energy than solid ice.