Ответ:

On their (first) evening, after dinner, they said good night to the Professor and went upstairs.