न कर्मणामनारम्भान्नैष्कर्म्यं पुरुषोऽश्नुते |
न च संन्यसनादेव सिद्धिं समधिगच्छति || 4||
One cannot attain freedom from the action by not initiating action, nor can one attain the perfection of knowledge by mere physical renunciation.
Bhagwan Shri Krishna highlights to Arjuna the paths taken by individuals to attain the ultimate truth: the first line refers to Karma Yoga and the second line points out to the Sankhya Yoga.
Bhagwan explains to Arjuna that an individual which abstains from the work or his rightful action, that individual can never reach a state of freedom from karmic reactions because even if one abstains from the action, it is hard for the mind to abstain from the thoughts of the action which leads to desires and attachments. This places them away from the path of freedom. Thus one must not only abstain from the action but with the help of the knowledge, one must abstain the mind from getting attached to fruition thoughts.
The next path is of the Sankya Yoga. An individual cannot attain the ultimate truth only by physically renouncing the world and living in a corner away from all the actions. The reason given by Bhagwan Shri Krishna is that even though that individual has renounced all the materialistic possession there might be thought inside that mind to attain those materialistic things. Unless and until the mind is pure, it can attain the ultimate truth. Thus, one must perform an action to purify the mind by removing all the desires and that action is needed even in Sankya Yoga.
Thus, both path of Karma Yoga and Sankhya Yoga requires action and knowledge to attain the ultimate truth. The only difference is that the proportion of the action and knowledge required varies, otherwise both are required to attain the ultimate truth.