Scheduled to work outside at night with 〜ことになっている
Grammar Explanation: Past decision still in effect with 〜ことになっている

Kate says she wants to study together with Emiriko before bedtime.
- エミリコ:
- 「あっ… ごめんなさい。実は外
( の仕事( を深夜( にもすることになって…」- “Ah, I'm sorry. The truth is, I'm scheduled to do late-night work outside...”
- 「また別
( の機会( にお願( いします!」- “Please ask again another time!”
- “Ah, I'm sorry. The truth is, I'm scheduled to do late-night work outside...”
Key Points
することになって points to an assigned plan
外
( の仕事( を深夜( にもすることになって means Emiriko has been scheduled to work outside late at night too.The sentence trails off because this explains why she cannot study now.
実は introduces the real reason
実
( は signals that she is revealing the actual scheduling conflict.It softens the refusal before she apologizes.
また別の機会に politely postpones
また別
( の機会( に means “another time”.お願いします keeps the refusal deferential toward Kate.