Comprehension and application

To what does ـهُ in وَعَلَّمَهُ refer?

Earning, good deeds, and seeking knowledge (Hadith 44–50)