I understand the sentence now. I was unable to articulate her explanation of the で particle's function in my edit. I've been looking in textbooks. but I can't find any function that explains her understanding of the particle here. some example sentences she wrote me:
トムは必死「で」帰国の準備をしています。- 必死「で」-> 必死「に」でもどちらでも同じ意味になります。
I think this time it is used as "and" since the second part is "another person appears"
I don't really know if there's a rule or not, but personally for me, if I am unsure then I just remove the で and see if the part before and the part after it make complete sentences that make sense.
Not sure if this helps.