You need commas for the first sentence. As for the second, it is correct as it stands but the commas can be omitted. In that case the meaning also changes: The student talking to the professor seemed puzzled.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.