Bablyonian Talmud, Book 5: Tracts Aboth, Derech Eretz-Rabba, Eretz-Zuta, and Baba Kama (First Gate), tr. by Michael L. Rodkinson, , at sacred-texts.com
BE always pleasant at your entering and at your leaving. Lessen your worldly business in order to study the law. It happened with R. Simeon b. Elazar, etc. (See Taanith, pp. 52 and 53, for the whole legend repeated here.) How shall one honor his master? (See Yomah, p. 52.) And so also we find with the three angels Gabriel, Michael, and Raphael, who came to Abraham our father. Gabriel's errand was to destroy Sodom and Gomorrah; Raphael's was to heal Abraham; and Michael's, to inform Sarah. And when Abraham saw the angels, the Shekhina came and stood above him, and he addressed the angels, saying: "My masters, wait awhile, until I take leave of the Shekhina, for you also must respect her," as it is written [Gen. xviii. 3]: "And
he said, My Lord, if now I have found favor in thy eyes, pass not away, I pray thee, from thy servant." And after Abraham took leave of the Shekhina he returned, and bowed to them and brought them under the tree, as it is written [ibid. 4]: "Let a little water, etc., be fetched, and wash, etc."; And then he said [ibid., ibid.]: "I will fetch a morsel of bread." Lot, however, said [ibid. xix. 2]: "And tarry all night, and (then) wash your feet?" Some of the anonymous teachers observe that in this very point Lot showed his prudence. He reasoned: If the Sodomites will see them after they have washed their faces, hands, and feet (i.e., I give them shelter overnight), they will kill me, my wife, and my daughters; but let the Sodomites see them with the dust on their feet, they will then think that they have just arrived.
He who accompanies his master ought not to depart from him without permission. When two disciples go or sit together (they need not ask for permission from each other), they are both equal.
It is customary that when entering, the master of the house enters first and the guest after him, and when leaving the house the guest leaves first and the master after him. And he who departs from his comrade, whether his comrade is greater than he or he is greater than his,,, comrade, he must inform him of his leaving. And every one may learn this from the Lord, who said to Abraham, "I leave you," as it is written [Gen. xviii. 33]: "And the Lord went away when he had finished speaking with Abraham; and Abraham returned unto his place" (from the wording, "and the Lord went away," it is inferred that He informed him).