2.51 The words 'phalam tyaktva, by giving up the fruits' are connected with the remote word 'karmajam, produced by actions'.
Hi, because; [Because, when actions are performed with an attitude of eanimity, it leads to becoming freed from sin etc. Therefore, by stages, it becomes the cause of Liberation as well.] buddhi-yuktah, those who are devoted to wisdom, who are imbued with the wisdom of eanimity; (they) becoming manisinah, men of Enlightenment; tyaktva, by giving up; phalam, the fruit, the acisition of desirable and undesriable bodies; [Desirable: the bodies of gods and others; undesirable: the bodies of animals etc.] karmajam, produced by actions; gacchanti, reach; padam, the state, the supreme state of Visnu, called Liberation; anamayam, beyond evils, i.e. beyond all evils; by having become janma-bandha-vinirmuktah, freed from the bondage of birth  birth (janma) itself is a bondage (bandha); becoming freed from that , even while living.
Or:  Since it (buddhi) has been mentioned as the direct cause of the elimination of righteousness and unrighteousness, and so on, therefore what has been presented (in the three verses) beginning with, 'O Dhananjaya,৷৷.to the yoga of wisdom' (49), is enlightenment itself, which consists in the realization of the supreme Goal, which is comparable to a flood all around, and which arises from the purification of the mind as a result of Karma-yoga. [In the first portion of the Commentary buddhi has been taken to mean samattva buddhi (wisdom of eanimity); the alternative meaning of buddhi has been taken as 'enlightenment'. So, action is to be performed by taking the help of the 'wisdom about the supreme Reality' which has been chosen as one's Goal.]