Honor you father and your mother in order that you lengthen your years in the land that Hashem your Lord has given you...You shall not covet the house of your friend. You shall not covet your friends wife his slave his maid servant his ox his donkey and everything of your friend (Shemos 20/12,14)
There are two opinions in the Medrash (Shemos Rabbah 47/6) how the Ten Commandments were written on the tablets of stone that Moshe Rabeinu brought down from Har Sinai. The more accepted opinion is Rebbi Yehuda's, who maintains that the first five commandments were written on the right hand side of the tablets and the second five on the left. (Rebbi Nechemiah maintains that all ten mitzvos were written on each side).
Zera Shimshon writes that many halachos and ideas are alluded to by the fact that the first five commandments are written adjacent to the second five.
For instance, there are four ideas Zera Shimshon teaches us that are alluded to by the fact that the mitzvah of honoring one's parents borders with the transgression not to covet on the other side of the Tablet.
The First Idea
The first idea starts with a question. When a person is born Hashem allots him a certain amount of time to live. Rabbi Akiva (Yevomos 50a) holds a person, no matter how righteous he is, cannot live more than that amount of time. His righteousness can only cause Hashem to let him complete the original allotted years, but they cannot be added to.
According to this, how does Rabbi Akiva understand the reward the Torah gives for honoring one's parents; "in order that your days will be lengthened? According to Rabbi Akiva a person's life can only be completed but not lengthened!
Zera Shimshon explains in light of Tosfos who asks a similar question. Tosfos explains that Hashem doesn't create extra years for a person "out of nowhere". When a person deserves to have his life lengthened, Hashem takes the years of someone who wasn't deserving of his allotted years, due to his misdeeds or some other reason, and gives them to a person who deserves them. Rabbi Akiva only holds that Hashem doesn't create extra years "out of nowhere" but Hashem does transfer years from one person to another.
According to this the connection between the mitzvah of honoring one's parents and the warning of "You shall not covet", which are written adjacent to each other, is to teach us that although the reward for honoring one's parents is longevity, a person should not wait, hope and crave this reward because he is in essence coveting someone else's years. Just like one cannot covet someone's possessions so to, one cannot covet someone else's years!
The Second Idea
The second way to understand the connection between honoring one's parents and the warning not to covet, is in light of Rashi's explanation of a statement of Raish Lakish (Avodah Zarah 5a) who says, "Come, let us show gratitude to our forefathers, for had they not sinned at the Golden Calf they would have lived forever, and we their descendants would be regarded as inconsequential because of their greatness. In other words, a parent's greatness can cover up a child's greatness.
This being so, a person might not want his parents to live long in order for that person to acquire the esteem that he feels he deserves and not be constantly overshadowed by his parents' prestige. Hashem therefore wrote the warning not to covet adjacent to the reward for performing the mitzvah of honoring one's parents to say that there is no reason to covet one's parents' early death. If one honors their parents they will merit longevity, much longer than their parents' life span, and there will be plenty of time for the world to observe their greatness.
Zera Shimshon adds that according to this idea we can understand another difficulty. It is written in Medrash Tanchuma (Ki Tatzay 2) that the reward for all of the mitzvos we do is longevity. This being so, why does the Torah specify that for honoring one's parents the reward is longevity?
The answer is that there is a fundamental difference between the reward of longevity for performing other mitzvos and the reward of longevity for honoring one's parents. Regarding other mitzvos longevity is simply a reward for doing the mitzvah. However, as we just explained, concerning honoring one's parents, longevity is directly connected with honoring them. If the child does not have longevity, there is a concern that he will not honor them and would want them to die young. Therefore, Hashem gives him longevity in order that he will willingly honor his parents.
The Third Idea
The third way to understand the connection is that both coveting and honoring one's parents depends on the intent of one's heart. That coveting is determined by the state of person's heart is obvious, however Zera Shimshon explains that honoring one's parent is also dependent on a person's intent.
We learn in the Gemara Kiddushin (31a-b) if a person feeds his father a fine meal of fattened birds but resents doing it, he is rewarded with Gehinnom while if he forces his father to grind with a millstone in order that he will not be forced to engage in more difficult and degrading work, he is rewarded with Gan Eden. The reason being is that honoring parents is determined by the state of the heart and not just the physical action being done. Therefore, even though feeding fine food to a father would seem like an act of honoring his parent since he has negative feelings doing this, it is not considered as honoring. And also vise versa; forcing a father to do degrading work with good intentions is considered honoring him.
The Fourth Idea
The fourth way: Both coveting and honoring one's parents is the root of, and brings to many other avairos and mitzvos. For instance, Achan confessed that he stole some of the booty from Yericho because he coveted them. Honoring one's parents can bring to doing many mitzvos. Contemplating the reason to honor parents, that they brought us into this world; will lead also to honor Hashem because, firstly, Hashem is also a partner in the conception of a person. The truth is that Hashem is actually the main partner since Hashem blows into a person his neshama which is the primary and most important part of a person. Another reason is that Hashem sustains us and gives us what is needed to stay alive. Therefore, just like coveting can lead to transgressing other avairos so to honoring parents can lead to honoring Hashem which in turn leads to observing the whole Torah.