たんだ

was …ing

→ いる
phrase Common #2,906
was …ing In these examples, this is a casual contraction of ていたんだ, describing what someone was doing. The んだ adds an explanatory or emphatic tone.
JA: 昨日、友達と映画を見てたんだ。
EN: I was watching a movie with a friend yesterday.

ここで働いてたんだ。

I used to work here.

トムと私は、昔同じ所で働いてたんだよ。

Tom and I used to work at the same place.

試験勉強で夜遅くまで起きてたんだ。

I stayed up late studying for the exam.

あの古い建物が解体されるのを見てたんだ。

I was watching that old building being demolished.

トムは自分の間違いに気づいてたんだ。

Tom realized his mistake.

トムと話してたんだ。

I was talking to Tom.

古い写真を見てたんだよ。

I was looking at some old photos.

トムは先月、ボストンに出張に行ってたんだ。

Tom was on a business trip to Boston last month.

最初から気に入ってたんだよ。

I liked it from the very beginning.

トムは自分の子供のことを考えてたんだ。

Tom was thinking about his children.