No, Tam's not really with both of them at the same time. That novel just does a terrible job of explaining where the various characters are in relation to each other's time lines.
This isn't the first time, either; Crossroads of Twilight was almost entirely scenes that ran in parallel to the end of Winter's Heart.
In Towers of Midnight, you need to pay attention to the times that Perrin "sees" Rand, either through his visions or, near the end, in person. That will give you a clue how far back you need to go to find that same spot in Rand's point of view. In particular, in The Gathering Storm, Cadsuane brings Tam to Rand in an attempt to stop him from going full-evil; however, when we first see Perrin in Towers of Midnight, this hasn't happened yet. It's not until much later in Perrin's story that we reach the point where Rand is atop Dragonmount going nuclear, which happened right after Rand's fight with Tam.