If he misses the first prayer in congregation in the mosque, should he pray with his family or should he come to the mosque for the second prayer in congregation?
Question

If a man prays in his house with his children, is it regarded as prayer in congregation? If he misses the first prayer in congregation in the mosque, should he hasten to go to the mosque in order to catch up with others praying in congregation or is it acceptable for him to pray at home with his children, for example? If a man prays with his wife only, is it regarded as a prayer in congregation?.
Praise be to Allah.Prayer in congregation in the mosque is obligatory for men who are able to do that, if they can hear the call to prayer, as has been explained in the answer to question number 8918. 
If a person comes to the mosque and finds that he has missed the prayer in congregation, it is prescribed for him to pray in congregation with others who also missed it, or with other worshippers who pray with him as an act of charity, because of the reports narrated by Abu Dawood (574) from Abu Sa’eed al-Khudri (may Allah be pleased with him) that the Messenger of Allah (blessings and peace of Allah be upon him) saw a man who was praying alone, and he said: “Will any man be charitable towards this one and pray with him?” The hadeeth was classed as saheeh by al-Albani in Saheeh Abi Dawood.
If he knows that the congregation in the mosque has ended and he is in his house, then he may pray with his family or he may go to the mosque to offer the prayer there with the second congregation. 
Shaykh Ibn ‘Uthaymeen (may Allah have mercy upon him) was asked: What is the ruling on having a number of prayers in congregation in a mosque which has a regular imam and a regular muezzin? 
He replied: Having a number of congregations is divided into two categories. The first category is when that is done regularly so that the second congregation deliberately comes late in order that a second congregation may be done. This is an innovation, because only one congregational prayer should be done in the mosque. 
The second category is when that is not done regularly and deliberately, but after the first congregation ends some other people come into the mosque and they offer their prayer in congregation. This is prescribed and is Sunnah, because the Prophet (blessings and peace of Allah be upon him) was with his Companions one day, and a man came in who had missed the prayer, and he said: “ Who will be charitable towards this man and pray with him?” and one of the Companions got up and prayed with him. 
And because the Prophet (blessings and peace of Allah be upon him) said: “A man’s prayer offered with another man is better than his praying on his own, and his praying with two other men is better than his praying with one other man. The more there are the more beloved it is to Allah.”  
With regard to the notion held by the people that having a second prayer in congregation is an innovation, that is correct if it is done regularly and deliberately. But if it happens occasionally, then having a second prayer in congregation is Sunnah, because of the command of the Prophet (blessings and peace of Allah be upon him and his family). 
Question: Even if it is done in the house after the first prayer in congregation has ended? 
Shaykh: No, in the mosque is better, because if it is done in the mosque the size of the congregation may increase and people who come later may join it, so that will be better. Moreover, sometimes people go from their houses to the mosque in order to pray with the congregation, but they may miss it and find that they have already prayed, in which case praying in the mosque is better for him and others, because if he and his companion return home and offered a prayer in congregation there, another person may come after the first prayer in congregation has ended and find no congregation, so he misses out on praying in congregation. So it is better for it to be in the mosque. 
Yes, if we assume that he knew when he was at home that the prayer in congregation had ended, then in this case we say: It makes no difference, pray in your house, because if he goes out to the mosque he may feel embarrassed to meet people when they are coming out from the prayer, so he may pray in his house. 
But if he has come and entered the mosque, and found that they have already prayed, he should not leave. Rather he should pray with the congregation in the mosque. End quote from Liqa’ al-Baab al-Maftooh, 41/12. 
A congregation may consist of two people, an imam and one who prays behind him. If a man is excused for not praying in congregation or he has missed the prayer in congregation, and he prayed with his wife, then this is a congregation and his wife should stand behind him.
See also the answer to question number 98739. 
And Allah knows best.