Usually it happens while praying in prayer room at office, people gathered and form Jamat. So in this case, if you are in the middle of offering your individual Farz prayer. Should you discontinue the prayer to participate in Jamaat?
According to Saheeh Muslim:
The Prophet (salallahu alayhi wa sallam) said, "When the Iqamah is called, no prayer should be performed except the obligatory prayer." (Riyad As-Saliheen, Saheeh Muslim)
This hadith talks about a similar situation: someone is praying in jama'ah, already, and you show up. For example, you rush to pray Fajr in the masjid without praying your sunnah; you show up, and they already started salaat-ul-Fajr. Can you pray your sunnah, and then join them?
Scholars say (sunni scholars), specifically, "no, you cannot," because of this hadith.
Your case individually is different. Allah knows best. I would suggest coordinating with them the timings, so you can pray in jamaat from the start.
You must bear in mind that before starting your salaah, your niyyah was to perform the farz, so discontinuing is not what you should do until absolutely necessary. Secondly, there is no question of being accused of rejecting the jama'ath because at the time of starting the prayer(during niyyah) you were totally unaware of the jama'ath.
As an advice I would like to say a thing. If you are behind the jama'at's Imaam, you can coordinate the timings if you like and end after your required raka'ats are over. But, if the jama'at is formed such that the imaam is actually behind you, if you follow him you are violating the terms of jama'at that the imaam must be in front of the followers.
And verily Allah knows best.
According to Hanafi Fıqh, cancelling an ibadah deliberately and without an excuse is haram. However, cancelling in order to gain the virtue of jama'ath is compared to demolishing a Masjid in order to renewing and correcting it.
According to "catching the farz" part of the book Ni'met-i İslam, cancelling farz and joining the jama'ath is mustahab if you haven't reached the first Sujiud (that is you should participate in jama'ath). If you reached to the first Sujiud there different conditions and details to be asked a scholar or read from a book.
According to Jafari Fiqh No. breaking a prayer is sin. You can finish it quickly and join Jamaat.
also if you have finished your prayer and want to have the reward of Jamaat you can offer a Ghaza (past lost prayer) with Jamaat and if you have no lost prayer you can offer a Mustahab prayer with Jamaat and gifts its reward for your dead relieves like parents or prophet or Ahl Bayt. (And they will respond your gift by a better gift based on below verse)
وَإِذَا حُيِّيتُم بِتَحِيَّةٍ فَحَيُّوا بِأَحْسَنَ مِنْهَا أَوْ رُدُّوهَا ۗ إِنَّ اللَّـهَ كَانَ عَلَىٰ كُلِّ شَيْءٍ حَسِيبًا
[4:86] And when you are greeted with a greeting, greet [in return] with one better than it or [at least] return it [in a like manner]. Indeed, Allah is ever, over all things, an Accountant.