Upon seeing someone in trial or tribulation1 du'a

Praise is to Allah Who has spared me what He has afflicted you with, and preferred me greatly above ...

Reference:At-Tirmidhi 5/493,4. See also Al-Albani, Sahih At-Tirmidhi 3/153.Hisnul Muslim 194

الْحَمْـدُ للهِ الّذي عافاني مِمّا ابْتَـلاكَ بِهِ وَفَضَّلَـني عَلى كَثيـرٍ مِمَّنْ خَلَـقَ تَفْضـيلا

Transliteration

Alhamdu lillāhi ‘l-ladhī `āfānī mimmab-talāka bihiwa faḍḍalanī `alā kathīrin mimman khalaqa tafḍīlā.

Translation

Praise is to Allah Who has spared me what He has afflicted you with, and preferred me greatly above much of what He has created.