Let's identify first the phases of matter inside each of those beakers. The first beaker on the left has a compact shape and has its own volume. So, that must be solid. The middle beaker has a compact shape but it takes the shape of its container. So, that must be liquid. The third beaker on the right is gas because the molecules are far away from each other.
After identifying each states, let's investigate the energy for phase change. Let's start with the arrows pointing to the right. The first arrow to the right is a phase change from solid to liquid. The intermolecular forces in a solid is the strongest among the three phases of matter. So, you would need an input of energy to break them apart into liquid. The same is true for the phase change from liquid to gas. Therefore, all the arrows pointing to the right require an input of energy.
The reverse arrows pointing to the left needs to release energy. The molecules in the gas state are free such that they can travel from one point to another easily. They have the highest amount of energy. So, if you want the molecules to come closer together, you need to remove the energy to keep them in place. Therefore, the arrows pointing to the right require removal of energy.