بَيْنَمَا رَسُولُ اللَّهِ ﷺ يَمْشِي إِذْ جَاءَهُ رَجُلٌ
“While the Messenger of Allah ﷺ was walking, a man arrived.”
بَيْنَمَا ... إِذْ connects an ongoing situation with another event occurring during it.
ارْكَبْ
“Please ride.”
This is an imperative, used by the man as a respectful invitation.
إِلَّا أَنْ تَجْعَلَهُ لِي
“Unless you assign it to me.”
إِلَّا introduces an exception. The suffix هُ in تَجْعَلَهُ refers to the place being offered, and لِي means “for me.”