Yes, sugar's melting point is much lower than the other four solids. They were probably able to rule out ice immediately because it would melt at room temperature. That leaves the other solids. They could identify sugar and salt by color and then heat both, seeing which one melts first. That would be sugar.