(a) Sayyiduna Ibn Umar (may Allah be pleased with him) said that when the Messenger of Allah (peace and blessings be upon him) came to Makkah and performed tawaf for Hajj and Umrah, he would run three rounds around the House and walk four, then pray two rak'ahs, then go between Safa and Marwah.
(b) In the narration of Shuja' the wording is: When he came for Hajj and Umrah and performed tawaf, he would run three rounds around the House and walk four rounds slowly. He did not mention the words after that.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الحج / 9283