Why are Aharon's sons also referred to as Moshe's offspring?
This is because Moshe taught Aharon's children Torah, explains Rashi. This teaches us that whoever teaches his friend's son Torah is viewed by the Torah as if he had fathered him.
Even at the young age of five, R' Heschel of Cracow was already known as a prodigy, and many scholars enjoyed discussing Torah matters with him.
"Please enlighten me" said one of the scholars. "Rashi teaches us that 'whoever teaches his friend's son Torah is viewed by the Torah as if he had fathered him.'
"Yet in Maseches Bava Metzia, Chazal state that the honor that one must show his teacher is greater than the honor he must show his father. For his father only brought him to this world, while his teacher — by teaching him Torah — brings him to the World to Come as well.
"So perhaps you can tell me" he continued, "which is greater: the honor that one must demonstrate for a teacher, or the honor that one must demonstrate for a parent?"
The young R' Heschel thought for a brief moment and then replied "The honor that should be accorded the teacher is certainly greater, as he has enabled the student to earn a share in the World to Come. When Rashi says that 'whoever teaches his friend's son Torah is viewed by the Torah as if he had fathered him,' he means to say that it is as if he fathered him and taught him Torah!"
Rabbi Y. Bronstein