Answered by Shaykh Amjad Rasheed
If a latecomer fears that he will miss the group prayer if he walks to an upper row to fill a gap, then is it permissible for him to quickly stand in the back of the jama`ah alone [s. starting a new row]?
Praying behind a jama`ah while standing in a row on one’s own is makruh, but not haram, nor does it invalidate the prayer if one stands apart from the row. However, it seems that exerting oneself to fill a gap and then saying the opening takbir is better than simply saying the opening takbir behind the jama`ah while standing in a row on one’s own, even if one fears missing the group prayer. The reason for this is that doing so takes one out of the disagreement of those who say that praying behind a group while standing in a row on one’s own invalidates the prayer of the person who stands alone, and it is possible that one might catch the group prayer.
Amjad Rasheed
(Translated by Shazia Ahmad)