The reason the landlady knows Sophia's name and some details of her family is that the lieutenant mentioned her as the reason for Tom's fight with Northerton.
In fact (of course) she has never met any of the Westerns in person.
Because Tom is an idiot, he believes the landlady when she says that Sophia has often stayed at this hotel—in fact, in this very room.
When the landlady leaves abruptly, Tom throws himself on the bed and thinks of Sophia.
The surgeon arrives to check on Tom while he's lying there.
The surgeon thinks that Tom needs to be bled again.
Tom refuses, because bleeding. Gross.
The surgeon warns Tom that he might die of fever in a month or two if Tom doesn't allow him to drain some of his blood right now.
Tom still refuses.
The surgeon goes down to the hotel kitchen to complain to the landlady about Tom.
The landlady warns the surgeon that Tom is not a rich man.
When Tom refuses once again to be bled, the surgeon says he won't treat Tom for another minute.
The surgeon stomps off, calling Tom a "vagabond" (8.3.14).