Praise be to Allah.
Shaykh ‘Abd al-‘Aziz ibn Baz (may Allah have mercy on him) said:
If one comes when the prayer has already begun, he should pray with them, and the obligatory prayer takes the place of tahiyyat al-masjid. What is prescribed is not to sit down until after one has prayed.
So if one prays the Sunnah prayer of Fajr , that is sufficient. Similarly, if one comes and the prayer has already started, then the obligatory prayer is sufficient and he does not need to pray tahiyyat al-masjid .
If one prays both – i.e., he prays tahiyyat al-masjid, then he prays the Sunnah prayer of Fajr – there is nothing wrong with that, but not doing that is better, and the best is to pray the Sunnah prayer of Fajr, because it is the regular Sunnah prayer, and doing that is sufficient with no need for the prayer to greet the mosque. That is because the Messenger (blessings and peace of Allah be upon him) used to pray two rak`ahs only after dawn had broken. He did not pray more than two rak`ahs after dawn had broken, and that was the Sunnah prayer of Fajr.
So the best is not to do more than two rak`ahs, and if you pray them with the intention of the sunnah prayer of Fajr , there is no need to pray tahiyyat al-masjid.
But if someone offered the Sunnah prayer of Fajr at home, then came to the mosque before the iqamah is given for the (obligatory) prayer, then he should pray tahiyyat al-masjid before he sits down, because in that case he does not have to offer the Sunnah prayer of Fajr, as he already prayed it at home. So he should pray tahiyyat al-masjid and then sit down.” (Fatawa Nur ‘ala ad-Darb, 2/878)
And Allah knows best.