

This verse is from the Bhagavad Gita, Chapter 6, Verse 32. It is written in Sanskrit and translates to English as follows:
ātmaupamyena sarvatra samaṁ paśhyati yo ’rjuna
sukhaṁ vā yadi vā duḥkhaṁ sa yogī paramo mataḥ || 32 ||
"Lord Krishna tells Arjuna that the person who considers all living beings as his equals and sees happiness and sorrow with the same perspective is a true Yogi. He considers his experience of happiness and sorrow to be equal to the experience of happiness and sorrow of other living beings. Such a Yogi is considered the best by God."
Atmoupamyena - with equality of the soul, like himself
Sarvatra - everywhere, in every situation
Samam pashyati - equally sees
Ya: Arjuna - the person who, O Arjun
Sukham va - whether it is happiness or
Yadi va: Dukham - whether it is sorrow
Sa yogi - that Yogi