Two tandem flexible flags in a viscous flow were modeled by numerical simulation using an improved version of the immersed boundary (IB) method. Flexible flapping flags and the vortices produced by an upstream flag were found to interact via either constructive or destructive mode. These interaction modes gave rise to significant differences in the drag force acting on the downstream flapping flag in a viscous flow. The constructive mode increased the drag force while the destructive mode decreased the drag force. Drag on the downstream flexible body was investigated as a function of the streamwise and spanwise gap distances, and the bending coefficient of the flexible flags at intermediate Reynolds numbers ($200 \le Re \le 400$). In addition, pitching and heaving motions were applied to a downstream flag, in order to change the interaction modes regardless of the gap distances and the bending coefficient.