When using distillation to separate water from dissolved sugar, the phase changes involved are from a liquid to a gas (when the water evaporates) and then back to a liquid (when the water is condensed). Therefore, the correct response is:
from a liquid to a gas, and back to a liquid.