If you're early, you could go upstairs and 'visit' with Hillary.
At the right time, listen to what the professor says.
Get the Deplumit spell on the table before or after he's there.
Don't forget the key on the table, after the professor leaves.