Text this: The Dynamics of Students’ Cognitive States in the Process of Problem Solving