。
I was supposed to return home the next day.
Literal
Next-day [topic-は] home [to-に] return [ことになっていた] (it-was-arranged).
The past form ことになっていた ('it had been arranged that') marks a past scheduled/decided state. Distinct from ことになった ('it was decided,' completed action) — the ~ていた form emphasizes the ongoing state of the arrangement at that past time.