Question:
Is praying in mosque more rewarding than praying in congregation at home?
Answer:
Hadith states, congregational prayer is 25 or 27 times more rewarding than praying alone.
The hadith compares: Individual vs congregation.
It does not restrict reward to mosque only. If you pray in congregation at home, 27x reward applies.
However, there is additional reward for walking longer distance to mosque.
Hadith (Bukhari 651): The one who walks the furthest distance to mosque earns greater reward. So mosque prayer carries extra virtue. Is mosque attendance obligatory? The answer is; Congregation is strongly emphasized but prayer remains valid if done alone. If someone is unable (distance, illness, hardship), they may pray at home. If several family members pray together at home — they earn congregational reward.