Is one allowed to walkaway from a minyan after davening Mincha. This minyan davens Mincha right before the Shekia and Ma’ariv just after, and he wants to daven Maariv later at night, if he leaves the people without a minyan?

Igrois Moshe (3: 16), quoted by Piskei Teshuva (56: 32) and other Poskim maintain that one is not allowed to abandon the minyan if there will not be ten without him. Even when he is not participating on that Tefila but rather davening later, he should stay for the time it takes for the present minyan to function.