By Rabbi Shimon Raichik
When the Tzemach Tzedek was a boy and learned the passage, "Yaakov lived in the land of Egypt seventeen years," his teacher translated according to the Baal Haturim commentary: "Our father Yaakov lived his seventeen best years in Egypt." When he returned home from Cheder he asked his grandfather, the Alter Rebbe: How can it be that our father Yaakov, the elect of the Patriarchs, should have as the best years of his life the seventeen that he lived in Egypt, the land of corruption?
The Alter Rebbe answered: It is written, "And Yehuda he sent before him to Yosef to give instructions for Goshen." The Midrash states, and Rashi quotes this, R. Nechemya said - to establish a house of study so Torah would be there and the tribes would study Torah. "To give instructions for Goshen" means (in a deeper sense), when one learns Torah he comes closer to The Al-mighty, may He be blessed, so even in Egypt it was true to say vay'chi - he lived. [HaYom Yom, 18 Teves]
The Rebbe analyzes this well known HaYom Yom and asks what was the question of the Tzemach Tzedek?
Yaakov had not seen Yosef for twenty two years. Now Yaakov is told that Yosef is alive and that he is a tzadik! Yaakov never imagined he would see his son, and now sees him and his two children, Efrayim and Menashe, educated in the same way as Yaakov's own children. Yaakov is so happy, together with Yosef both physically and spiritually.
The Rebbe explains that the Tzemach Tzedek was bothered; truly, Yaakov was happy to see the spiritual level of Yosef in Mitzrayim. But Mitzrayim stems from the word limitation and is called the land of corruption. How can the best years of Yaakov be in such a place, and not in Eretz Yisroel? We can understand that it could be similar to Eretz Yisroel, but why are these 17 years described as the best?
The Alter Rebbe's answer is that through the study of Torah, a person becomes close to Hashem. Meaning, he lifts himself through learning Torah the and he he is now lifted beyond all limitations, even the limitations of Mitzrayim, so therefore there can be Vayechi - True Life. Under the Mitzrim Yaakov and the Shevotim were not limited. As the Tzemach Tzedek later explained, they merited to convert the darkness of Mitzrayim to light.
What does this teach us? A person shouldn't want to be in Mitzrayim and we should run away from things that disturb us from our service to Hashem. As we say in davening “Hashem do not bring us to any tests,” but when we are tested and find ourselves in this position, knowing that by learning Torah and doing mitzvos we connect ourselves to Hashem, giving us the power to convert the test to the positive. This becomes the best of our life.
[Likutei Sichos Vol. 10]