Let me add:
When working out onto the floor, you should be heading over there on an angle AWAY FROM the offensive team's basket. You are sacrificing a bit of distance to gain a better angle.
Most time when I'm forced over so that I can officiate a ball handler on the other side of the court (just above the FT line, which is still in the trail's primary), I will work deeper and will frequently step into the backcourt to do so.
Still, you do get trapped every once in a while. In that case, the best thing is to stand still until the players pass and then follow the play, buttonhooking in at the free throw line if you need to officiate a drive from behind.
The worst thing you can do is continue to the baseline in that situation, because you will have the worst possible angle -- getting straightlined right out of any foul.
And in that situation, the old lead/new trail will need to hustle back and help with the fouls coming from his side.
2-whistle is hard
Rich