How to handle parallel timelines when your party is separated?

Let’s say a four-person party separated into two, with two PCs each. They each proceed to do different part of a quest to speed up progression. The quest is to find two kinds of flowers in different places.

How to handle the progression of the quest for each party? I originally designed the quest for each area to be completed in sequence (either A then B, or B then A), so they are a bit complex, one with a lot of traps and ambushes, and the other one is combat-based, with 30-60 minutes to complete each area.

Should I let group A play first until it completes the area; or should I let group A play to 50% completion, then switch to group B until 50% too, then switch back to A? I’m concerned that my players will be bored and lose interest doing nothing (they are new to D&D).