B.G 2.51
कर्मजं बुद्धियुक्ता हि फलं त्यक्त्वा मनीषिणः। जन्मबन्धविनिर्मुक्ताः पदं गच्छन्त्यनामयम् ॥२-५१॥
karmajaṁ buddhiyuktā hi phalaṁ tyaktvā manīṣiṇaḥ। janmabandhavinirmuktāḥ padaṁ gacchantyanāmayam ॥2-51॥
The great achievers perform actions possessed with the right knowledge. Relinquishing the results, certainly they become free from the bondage that causes birth and reaches the ultimate goal without difficulty.
Gīta Bhāshya 2.51
Action performed with the right attitude leads to knowledge, that in turn leads to liberation. Relinquishing the results means offering it to the lord.
The solution is elaborated by 'karmajaṁ' verse. Perform actions without desire and relinquish the fruits of action by offering them to the lord. 'budidhayuktāḥ' - becoming perfectly knowledgeable one attains the goal. "Action performed with the right attitude leads to knowledge, that in turn leads to liberation" - is the intended meaning.