The correct option is this: Q – LIQUID TO SOLID.
Looking at the information given above, we are told that, before the change, the atoms are close together but are able to slide past one another. This is one of the characteristics of liquids, the particle in liquids are held together by inter molecular forces but they are still able to slide past one another. So, this tell us that, the substance was originally in the liquid state.
We are also told that, the atoms of the substance lose energy during the change of state. If there is a loss of energy, it means that, the little energy that the particles had before, which they were using to slide past one another is now removed and the particles becomes more compact. This implies that, the substance changes to solid. If the substance change to gas, there would have been gain of energy not loss. Therefore, the correction option is D. The substance change from liquid state to solid state.