Question: Is there a yichud problem for a man and woman to be alone on…
Question: It is tax season, and some accountants are staying late in the office. By 7:30pm, everyone has left except one man and one woman. Knowing this could be a problem of yichud, they suggest that one of them lock themselves in an inner office, while the other remains in the outer room. Is this permitted?
Answer: The Chazon Ish is quoted as saying that this would only be permitted if the woman locked herself in the inner room and the man stayed in the outer room. He explains that the norm is for the man to initiate an interaction; so as long as the woman is locked away from the man and he cannot reach her, there is no problem of yichud. If, however, the man locks himself in the office, it would still be Yichud since he could readily exit his office to where the woman is sitting in the outer room.
Rav Moshe Feinstein is more stringent and says that this is Yichud even if the woman is locked in the inner office because the man might try and persuade her to open the door to do an aveirah.
On the other extreme, Rav Yosef Chaim Sonnenfeld is quoted as saying that this would be permitted no matter which one of them is locked in the inner room. His source is the Mishnah Berurah, who seems to permit a man and woman to stay in a home overnight if either one of them is locked in a bedroom.
Practically speaking, even according to the lenient opinion, it would only be permitted if the one who is leaving first is in the outer room, this is to avoid having two people alone together in the outer room.