had been staying in
彼女は少し前に滞在していた。
She had been staying there until a little while ago.
彼はかなり長い時間そこに滞在していた。
He stayed there for quite a long time.
彼女は少しの間そのあたりに滞在していた。
She stayed around there for a while.
私は日本に帰ってくる前にずっとボストンに滞在していた。
I had been staying in Boston before returning to Japan.