In line with the Qur'anQur'an 33:21 ↗لَّقَدۡ كَانَ لَكُمۡ فِي رَسُولِ ٱللَّهِ أُسۡوَةٌ حَسَنَةٞ لِّمَن كَانَ يَرۡجُواْ ٱللَّهَ وَٱلۡيَوۡمَ ٱلۡأٓخِرَ وَذَكَرَ ٱللَّهَ كَثِيرٗا
You have an excellent example in the Messenger of God; for anyone who seeks God and the Last Day, and remembers God frequently.
The verse says the Messenger of God is a good example for believers, the very verse Ibn Umar recites to justify following the Prophet's rites.
In line with the Qur'anQur'an 2:125 ↗وَإِذۡ جَعَلۡنَا ٱلۡبَيۡتَ مَثَابَةٗ لِّلنَّاسِ وَأَمۡنٗا وَٱتَّخِذُواْ مِن مَّقَامِ إِبۡرَٰهِـۧمَ مُصَلّٗىۖ وَعَهِدۡنَآ إِلَىٰٓ إِبۡرَٰهِـۧمَ وَإِسۡمَٰعِيلَ أَن طَهِّرَا بَيۡتِيَ لِلطَّآئِفِينَ وَٱلۡعَٰكِفِينَ وَٱلرُّكَّعِ ٱلسُّجُودِ
And We made the House a focal point for the people, and a sanctuary. Use the shrine of Abraham as a place of prayer. And We commissioned Abraham and Ishmael, “Sanctify My House for those who circle around it, and those who seclude themselves in it, and those who kneel and prostrate.”
The verse commands taking the station of Abraham as a place of prayer, matching the two units the Prophet prayed behind the Maqam after circling the House.
In line with the Qur'anQur'an 2:158 ↗۞إِنَّ ٱلصَّفَا وَٱلۡمَرۡوَةَ مِن شَعَآئِرِ ٱللَّهِۖ فَمَنۡ حَجَّ ٱلۡبَيۡتَ أَوِ ٱعۡتَمَرَ فَلَا جُنَاحَ عَلَيۡهِ أَن يَطَّوَّفَ بِهِمَاۚ وَمَن تَطَوَّعَ خَيۡرٗا فَإِنَّ ٱللَّهَ شَاكِرٌ عَلِيمٌ
Safa and Marwa are among the rites of God. Whoever makes the Pilgrimage to the House, or performs the Umrah, commits no error by circulating between them. Whoever volunteers good—God is Appreciative and Cognizant.
The verse names Safa and Marwa among God's symbols and approves going between them in hajj or umra, matching the Prophet's walking between them.