In line with the Qur'anQur'an 2:43 ↗وَأَقِيمُواْ ٱلصَّلَوٰةَ وَءَاتُواْ ٱلزَّكَوٰةَ وَٱرۡكَعُواْ مَعَ ٱلرَّٰكِعِينَ
And attend to your prayers, and practice regular charity, and kneel with those who kneel.
The verse commands bowing with those who bow, the congregational prayer offered to the man who prayed alone.
In line with the Qur'anQur'an 5:2 ↗يَٰٓأَيُّهَا ٱلَّذِينَ ءَامَنُواْ لَا تُحِلُّواْ شَعَٰٓئِرَ ٱللَّهِ وَلَا ٱلشَّهۡرَ ٱلۡحَرَامَ وَلَا ٱلۡهَدۡيَ وَلَا ٱلۡقَلَٰٓئِدَ وَلَآ ءَآمِّينَ ٱلۡبَيۡتَ ٱلۡحَرَامَ يَبۡتَغُونَ فَضۡلٗا مِّن رَّبِّهِمۡ وَرِضۡوَٰنٗاۚ وَإِذَا حَلَلۡتُمۡ فَٱصۡطَادُواْۚ وَلَا يَجۡرِمَنَّكُمۡ شَنَـَٔانُ قَوۡمٍ أَن صَدُّوكُمۡ عَنِ ٱلۡمَسۡجِدِ ٱلۡحَرَامِ أَن تَعۡتَدُواْۘ وَتَعَاوَنُواْ عَلَى ٱلۡبِرِّ وَٱلتَّقۡوَىٰۖ وَلَا تَعَاوَنُواْ عَلَى ٱلۡإِثۡمِ وَٱلۡعُدۡوَٰنِۚ وَٱتَّقُواْ ٱللَّهَۖ إِنَّ ٱللَّهَ شَدِيدُ ٱلۡعِقَابِ
O you who believe! Do not violate God’s sacraments, nor the Sacred Month, nor the offerings, nor the garlanded, nor those heading for the Sacred House seeking blessings from their Lord and approval. When you have left the pilgrim sanctity, you may hunt. And let not the hatred of people who barred you from the Sacred Mosque incite you to aggression. And cooperate with one another in virtuous conduct and conscience, and do not cooperate with one another in sin and hostility. And fear God. God is severe in punishment.
The verse calls for cooperation in righteousness, matching the man who stood up to pray with him as an act of charity.