Valmiki Ramayana Sundara Kanda Sarga 21 Shloka 20
Original Shlokaविदितः स हि धर्मज्ञः शरणागतवत्सलः।।5.21.20।। तेन मैत्री भवतु ते यदि जीवितुमिच्छसि।
1 source checked for this shloka
धर्मज्ञः one who knows dharma, सः he, शरणागतवत्सलः kind to those who seek his protection, विदितः हि famous, जीवितुम् to preserve your life, इच्छसि यदि if you so desire, ते to you, तेन with him, मैत्री friendship, भवतु be built.
"He is famous as a knower of dharma and is compassionate to those who seek his protection. If you desire to preserve your life build friendship with him.