Reference : Hisn al-Muslim 236

(لَمَّا دَنَا النَّبِيُّ صلى الله عليه وسلم مِنَ الصَّفَا قَرَأَ: ﴿إِنَّ الصَّفَا وَالْمَرْوَةَ مِنْ شَعَآئِرِ اللَّهِ﴾ "أَبْدَأُ بِمَا بَدَأَ اللَّهُ بِهِ" فَبَدَأَ بِالصَّفَا فَرَقِيَ عَلَيْهِ حَتَّى رَأَى الْبَيْتَ، فَاسْتَقْبَلَ الْقِبْلَةَ، فَوَحَّدَ اللَّهَ وَكبَّرَهُ وَقَالَ: لاَ إِلَهَ إِلاَّ اللَّهُ وَحْدَهُ لاَ شَرِيكَ لَهُ، لَهُ الْمُلْكُ وَلَهُ الْحَمْدُ وَهُوَ عَلَى كُلِّ شَيْءٍ قَدِيرٌ، لاَ إِلَهَ إِلاَّ اللَّهُ وَحْدَهُ، أَنْجَزَ وَعْدَهُ، وَنَصَرَ عَبْدَهُ، وَهَزَمَ الْأَحْزَابَ وَحْدَهُ، ثُمَّ دَعَا بَيْنَ ذلكَ. قَالَ مِثْلَ هَذَا ثَلاَثَ مَرَّاتٍ) الْحَدِيثُ. وَفِيهِ: (فَفَعَلَ عَلَى الْمَرْوَةِ كَمَا فَعَلَ عَلَى الصَّفَا)
Whenever the Prophet (ﷺ) approached Mount Safa, he would recite:
Innaṣ-Ṣafā wa ‘l-Marwata min sha`ā'irillāh. 
Abda'u bimā bada'allāhu bih.
He began (his Sa`y) at Mount Safa climbing it, until he could see the House. He then faced the Qiblah repeating the words:
Lā ilāha illallāh, Allāhu Akbar
Then he said:
Lā ilāha 'illallāh
waḥdahu lā sharīka lah, 
Lahu ‘l-mulku wa lahu ‘l-ḥamd
wa Huwa `alā kulli shay'in Qadīr, 
lā 'ilāha illallāhu waḥdahu, 
anjaza wa`dahu, wa naṣara `abdahu, 
wa hazama ‘l 'aḥzāba waḥdah.
Then he would ask Allah for what he liked, repeating the same three times. He did at Mount Marwah as he did at Mount Safa.

Whenever the Prophet (ﷺ) approached Mount Safa, he would recite:

Surely Safa and Marwah are among the signs of Allah. I begin by that which Allah began.

He began (his Sa'y) at Mount Safa climbing it until he could see the House. He then faced the Qiblah repeating the words:

There is none worthy of worship but Allah, and Allah is the Most Great.

Then he said:

None has the right to be worshipped but Allah alone, Who has no partner, His is the dominion and His is the praise, and He is Able to do all things. None has the right to be worshipped but Allah alone, He fulfilled His Promise, He aided His slave, and He alone defeated Confederates.

Then he would ask Allah for what he liked, repeating the same thing like this three times. He did at Mount Marwah as he did at Mount Safa.

Reference:
Muslim 2/888.

Chapter: When at Mount Safa and Mount Marwah