Inside the bet-akeneset, at mincha/neillà time, arrived a news that to a men is died a brother, (in the same city and near to the bet akeneset)
is better that the men go out from the bet-akeneset and go to the brother home, or is better that he remains in the bet- akeneset also he not have hovà to pray?
In bother’s home he cannot do nothing to prepare the levaya, he cannot touch and move the gufa, but in bet-akeneset he no pray and can receive the nechemià, but at the same time he afflicts the other people…
Which is better and rights rule?
This is of course a very difficult situation.
Under the circumstances it is correct for him to remain in shul and finish to daven.
The laws of aveilut (and aninut) do not apply on Yom Kippur or on Shabbat, so that it is correct to finish the davening.
He can finish praying the ne’ilah, and then go home, before the Arvit prayer.