-다(가) in front of 나가다 means going out in the middle of something else: 또 얘기 좀 나누다 나가셨는데, 주변의 권유에 의해서 굉장히 망설이다 나갔었는데, (마네킹) 뒤에 있다 나가면 진짜 놀랄 텐데...!. With -았/었다 instead it becomes the alternation 들어왔다 나갔다, going in and out repeatedly: 여기 몇 번 들어왔다 나갔다 했다고, 들어갔다 나갔다 들어갔다 나갔다. All casual speech and captions.