What Happens If You Miss `Eid Prayer?
Question

On the morning of Eid Al-Fitr, when we reached the prayer place we found that the Imam had prayed and was finishing his sermon, so we prayed the two Rak`ahs of `Eid whilst the Imam was delivering the Khutbah. Was our prayer valid or not?
Praise be to Allah.`Eid prayer is Fard Kifayah (a communal obligation) ; if enough people undertake it, the rest are absolved of sin. 
In the scenario mentioned in the question, the obligatory duty had been discharged by those who prayed first – those to whom the Imam was delivering the Khutbah. 
For those who missed it and want to make it up, it is recommended for them to do so, so they should pray it without a Khutbah afterwards. This was the view of Imam Malik, Ash-Shafi`i, Ahmad, An-Nakhi`i and other scholars (may Allah have mercy on them). 
The basic principle concerning that is the words of the Prophet (peace and blessings of Allah be upon him): “When you come to the prayer, walk in a tranquil and dignified manner, and whatever you catch up with, pray, and whatever you miss, make it up.”  
It was narrated from Anas (may Allah be pleased with him) that if he missed the `Eid prayer with the Imam, he would gather his family and freed slaves, then his freed slave `Abdullah ibn Abu `Utbah would stand up and lead them in praying two Rak`ahs in which he would say the Takbirs . 
The one who reaches the `Eid prayers while the Imam is delivering the Khutbah should listen to the Khutbah, then he should make up the prayer after that, so that he may achieve two good things. 
For more details, please refer to the following answers: 96922 , 36491 , 49014 , 337550 , 36442 , 299437 . 
And Allah is the Source of strength.