Attach -았/었는데 to a verb stem (타다 → 탔는데, 먹다 → 먹었는데) to give background information in the past before saying what happened next. It sets the scene: "I did this, and then..." or "I did this, but...".
- 어제 지하철을 탔는데 지갑을 두고 내렸어요.
- 어제 카페에 갔는데 사람이 많았어요.
…Lesson 4-8 · Finding a lost item