She left the office immediately after finishing work.

Literal

She [topic-は] work [subject-が] finishing [then-て] immediately office [object-を] left.

直ちに ('immediately, at once') is a slightly literary adverb — heavier and more decisive than すぐに in everyday speech. Common in news reporting, formal announcements, and emergency instructions. The te-form of 終わる ('end, finish') connects the work-finishing as a temporal antecedent to the leaving. 事務所を出る uses を for the place left, the standard idiom for departure: 部屋を出る ('leave the room'), 家を出る ('leave home').