If one of the 10 started to pray by himself and [was in a part of the prayers where he] could not answer with them or he was sleeping, even here (ie. in this scenario), he is included with them.
Itt érdekes összehasonlítás arról, aki még imádkozik: https://ph.yhb.org.il/en/02-02-07/
...
...
GEMARA:Rav Yehuda said that Rav said: And the halakha is similar with regard to prayer, in that one who is standing outside the doorway cannot be included together with those praying inside. The Gemara notes that Rav disagrees with Rabbi Yehoshua ben Levi, as Rabbi Yehoshua ben Levi said: Even a barrier of iron does not separate between the Jewish people and their Father in Heaven. Barriers are irrelevant with regard to prayer.
...
...
Hosszan foglalkozik ilyen kérdésekkel:
All of the 10 need to be in one place and the prayer leader with them. And one who stands inside the doorway, [in the area of the doorway that is] from the door-stop and outward... meaning [the area] that when you close the door at the place of the inner [lip] of the thickness of the door and outwards - it is like [he is] outside.
If some of the ten [men] are in the synagogue and some of them are in the courtyard, they do not join with each other.
If one hears a fellow Jew reciting one of the blessings — even if he did not hear the entire blessing from beginning to end, and even if he himself is not obligated in that blessing — he is required to respond "Amen" after it. However, if the one reciting the blessing was a heretic, or a Samaritan, or a young child, or an adult who altered the established wording of the blessings, one does not respond "Amen" after him. Rema: One may respond "Amen" after a non-Jew if he heard the entire blessing from his mouth (Rabbenu Yitzchak, chapter Eilu Devarim).
The rule that one does not respond "Amen" after a child applies specifically when the child is learning the blessings from his teacher, for it is permitted to teach children the blessings in their proper form even though, during the learning, they are reciting the blessings in vain. However, when the children are reciting the blessings to fulfill their own obligation — since they are of an age of education (bnei chinuch) — one does respond "Amen" after them. The same applies when they recite the haftarah in the synagogue.
Gyerek áldása után mondott ámen: https://thehalacha.com/wp-content/uploads/Vol17Issue3.pdf