Yahya related to me from Malik from Nafi that a man askedAbdullah ibn Umar, "Sometimes I pray in my house, and then catch theprayer with the imam. Should I pray with him?" Abdullah ibn Umar saidto him, "Yes," and the man said, "Which of them do I make my prayer?"Abdullah ibn Umar said, "Is that up to you? It is up to Allah. He willdecide on whichever of them He wishes."
App reference: Book 8, Hadith 10
USC-MSA web (English) reference: Book 8, Hadith 10
Arabic reference: Book 8, Hadith 299