いたのだ

was ...ing

→ 居る
phrase Rare #25,464
was ...ing Usually follows a verb in the て-form. いた marks a past ongoing action or state, while のだ adds an explanatory or emphatic tone.
JA: 彼は毎日走っていたのだ。
EN: He had been running every day.

親戚に頼んで、向こうの値段を調べてもらっていたのだ。

I’d asked a relative to check how much it cost over there.

見る欄を間違えていたのだ。

I was looking at the wrong section.

私はだまされていたのだという結論に達した。

I came to the conclusion that I had been deceived.

カットは本当に定期的に恋人と会っていたのだ。

Kat really was seeing their partner regularly.

今までこの本を読んでいたのだ。

I've been reading this book up until now.

実は彼女はうそをついていたのだ。

The truth is, she had been lying.