Praise offered for both places at once
Said after rising from the bow in the morning prayer.
اللَّهُمَّ رَبَّنَا وَلَكَ الْحَمْدُ فِي الأَخِيرَةِ
Allāhumma rabbanā wa laka-l-ḥamd, mil'a-s-samāwāti wa mil'a-l-arḍ, wa mil'a mā shi'ta min shay'in baʿd.
“O Allah, our Lord, and to You is praise, filling the heavens and filling the earth, and filling whatever else You will.”
The full narration
Narrated Ibn `Umar:That he heard the Prophet, after raising his head from the bowing in morning prayer, saying, "O Allah, our Lord! All the praises are for you." And in the last (rak`a) he said, "O Allah! Curse so-and-so and so--and-so." And then Allah revealed:-- 'Not for you (O Muhammad) is the decision, (but for Allah), whether He turns in mercy to them or punish them, for they are indeed wrongdoers
Source
Ṣaḥīḥ al-Bukhārī · 7346
- Agreed upon as authentic (al-Bukhārī / Muslim)