The other day I was davening Maariv in a shared office when unexpectedly for the hour somebody entered.
I was in the middle of Shema so I decided to say it quietly at my desk until right before the Amidah, then move to a private room a few minutes’ away, and resume from Gaal Yisroel to end from memory.
I am wondering whether the movement ,and/or the few minutes of interval between the initial davening and the end of the prayer constitutes a hefsek so that I would have to pray again?
The movement itself does not constitute a hefsek, and you do not have to pray again.
If one stops during the berachos of the Shema for a time duration long enought to complete the berachos (from beginning to end), one must repeat the berachos (according to the Rema, Orach Chaim 65). However, this halachah only applies to a pause during which the person is unable to daven; in the case of walking, the halachah will not apply (see Shulchan Aruch, Orach Chaim 65, and Mishnah Berurah).
Moreover, this does not apply to a pause between Gaal Yisrael and the Amidah, after the berachos have been completed.
Yet, such a pause will cause you to lose the virtue of being somech ge’ulah le-tefillah.