If a worshipper is performing the Maghrib prayer alone and has already prostrated in the first unit, they must cut the prayer immediately to join the Maghrib congregation.

Catching Obligatory Prayers (إدراك الفريضة) Part 1