Should a latecomer pray the Fajr Sunnah before joining jamaat?

Question: A person comes to the Masjid for Fajr and the Fard prayer is taking place. However, he still hasn’t prayed his Sunnah. In which scenario should he leave the Sunnah prayer and join the fard? For example, when the Imam is in the second rakat or when he’s in...