To serve God, one must both ''turn away from evil'' and 'do good''. But which of these steps is the most important? And which must be prioritized first of all? [Naso 4: 1-28]
The sequence of Kehos' and Gershon's descendants in the Torah provides the key to answer these questions.
Gershon is related to the Hebrew word Gerushin, meaning ''divorce'' alluding to the process of turning away from and ''divorcing'' oneself from evil. Kehos means ''gathering'' [as in '''He will gather [yikhas] the people'' [Bereishis 49:10], alluding to the accumulation of good deeds - ''doing good''.
Gershon was the firstborn, indicating that at the outset, when one is just beginning to serve God, a person should stress the path of turning away from evil. This is in order to thoroughly cleanse oneself from negative traits before one can begin to sanctify oneself properly with good deeds.
However, in the Torah, Kehos' descendants are placed before Gershon's descendants [see Midrash] to indicate that, ultimately, ''doing good'' is the ultimate goal which actively brings a person close to God, and makes this world a ''home'' for Him.
Source: Based on Likutei Sichos Vol 13 p. 9 Lubavitcher Rebbe