Valmiki Ramayana Kishkindha Kanda Sarga 29 Shloka 13
Original Shlokaसन्त्यज्य सर्वकर्माणि मित्रार्थे योऽनुवर्तते4.29.13।। सम्भ्रमाद्धि कृतोत्साहस्सोऽनर्थैर्नावरुध्यते।
1 source checked for this shloka
यः whoever, सर्वकर्माणि all his deeds, सन्त्यज्य by giving up, सम्भ्रमात् with excitement, कृतोत्साहः with enthusiasm, मित्रार्थे for the sake of ally, अनुवर्तते does follow, सः to him, अनर्थैः harms, न अवरुध्यते not obstructed.
'Whoever sets aside his personal interest and works for the welfare of his ally with due enthusiasm and excitement will not be harmed.