How do the molecules in a solid state, liquid state and gaseous state compare to each other in terms of their motion and distance from each other?