The second Pasuk in Vayeishev states that Yosef was seventeen years old. It seems a bit odd for the Torah to randomly point out that Yosef was seventeen. What is the Torah trying to teach us?
Rav Yechiel Meir from Osterovtzah suggests an interpretation. At the end of Parshat Toldot, Rashi on 28:9 calculates that Yaakov must have studied at Yeshivat Sheim VaEiver for fourteen years on his way to Lavan’s house. However, this seems odd in light of 25:27, which states: “VeYaakov Ish Tam Yosheiv Ohalim.” Rashi points out there that Yaakov learned at Yeshivat Sheim VaEiver. If Yaakov already learned for a while at Yeshivat Sheim VaEiver before he ran away, why did he feel that he must make a fourteen-year pit stop to learn there again for an extended period of time before continuing to Charan to find a wife?
Rav Yechiel Meir answers wonderfully. When Yaakov learned in Yeshivat Sheim VaEiver before he ran away, that was to learn how to act towards Jews and how to live in a Jewish environment. However, when Yaakov was going to Charan he needed to learn how to interact with a foreign place, with Nochri society. Furthermore, Yaakov foresaw with Ruach HaKodesh that not only he would be in a Nochri environment, so would Yosef. Therefore, over the course of fourteen years, Yaakov taught Yosef all that he learned in the fourteen years in Yeshivat Sheim VaEiver.
As Darchei Moshe points out in his commentary on Tur Orach Chaim, a father should start to teach his son Torah when his son is three years old. Applying this to the case of Yosef, we see that if Yaakov started to teach Yosef when Yosef was three, and if he then taught him for fourteen years, the total is seventeen, which was Yosef’s age at the time he was sold into slavery.