After reading Mikes answer here https://scifi.stackexchange.com/a/89101/29220
it appears that both episodes are happening at the same time.
The most Logical thing I can think of is that, The Flash helps out Oliver in Nanda Parbat right before the conclusion of Rogue Air( the episode in which Oliver helps the flash catch the Reverse flash)
As we know from the point that the flash free's everyone in Nanda Parbat its a race between Oliver and crew to save the city and finish the fight against Ra's. At the end this episode, Oliver essentially "quits" from being the Arrow, and him and Felicity are seen driving away. From the point Oliver defeats Ra's to right before him and Felicity leave, i think is the most optimal moment for them to hit up Central city and capture the reverse flash.
Anything before this is hard to fathom that Oliver could leave Nanda Parbat without upsetting Ra's, so it makes sense for Oliver to conclude his arc, help barry, and move on with his life.
However, Oliver asks Barry for a favor AFTER helping him catch the reverse flash, and we appear to see that favor fulfilled when Barry comes to Nanda Parbat. So if this was the favor, then we have to assume, SOMEHOW, that Oliver got on a jet, didn't raise Ra's suspicions. helped Barry, and got back to Nanda Parbat. (IMO my version makes more sense. )