Yesterday, I worked in my office for eight hours till 9 PM.
-> Place before time, unless you want to stress the time (like yesterday)
-> You would not use the continuous form here, because the continuous is used for emphasizing that something was in progress: Yesterday, I was working in my office, when the robber came in.
I was completely absorbed in my favorite book on my way to work and back home.
Here you don't need the preposition.
You would need it for sentences like:
Back to school
Back to work
Home is the odd man out here