Maria agreed with him and favoured him with demure nods and hems. He was very nice with her, and when she was getting out at the Canal Bridge she thanked him and bowed, and he bowed to her and raised his hat and smiled agreeably, and while she was going up along the terrace, bending her tiny head under the rain, she thought how easy it was to know a gentleman even when he has a drop taken.
I came back to read this passage again when I realized that the cake was lost possibly in the tram. At the moment, Maria's emotions did not seem to the overflowing. We mainly see their actions--"bowed", "raised his hat", "bending her tiny head", etc.--and the only internal thought we have is at the end when Maria reflects "how easy it was to know a gentleman even when he has a drop taken." I wonder whether the reason why Maria was so shocked by the stranger gentleman's demeanor is that she is not used to people treating her so nicely.