Does driving to the mosque entail the same reward as walking?
In the Name of Allah, the All-Merciful, the Mercy-Giving
All praise is due to Allah. Peace and blessings be upon His Messenger Muhammad.
A number of prophetic statements strongly recommend walking to mosques. The Messenger (peace and blessings be upon him) is reported to have said, “The one among people who gets the greatest reward for Prayer is the one who comes walking to it from the farthest place and then the one who comes walking from the next farthest place…” [Muslim]
Ubay ibn Kab said, ‘There was a man whose house was farther from the mosque than anyone else’s, as far as I knew, and he never missed the [congregational] prayers. It was said to him, “Would you buy a donkey to ride on in the dark nights and in the burning sand.” He said, “I would not like my house to be by the side of the mosque, because I want my steps towards the mosque and back from it, when I return to my family, to be recorded.” Upon this the Messenger of Allah (peace and blessings be upon him) said, “Allah has gathered all these [rewards] for you.” [Muslim]
These and other reports give preference to walking to mosques over riding to them.
Still riding to the mosque, along with its expenses, is rewardable. Almighty Allah says, what means, “Moreover, anything you spend in the path of Allah shall be fully rendered to you.” [8:60]
Furthermore, when walking to the mosque involves unbearable hardship, such as when one is aged or resides very far away from the mosque, riding turns to be the reasonable solution.
Almighty Allah knows best.