This is all one effect. You draw 3 and return 2 cards all in one resolution. Nothing may happen between the two. If something triggers on drawing cards, it will go on the stack after Brainstorm finishes resolving.