Playing on 3 teams in two years is pretty common. If Team A trades an option year pitcher at the deadline to Team B, something that happens every year - and that pitcher signs with Team C after the season, there you go.
Now we see more pitchers dealt at the deadline with 1.5 seasons left, meaning they could be dealt at consecutive deadlines if the first acquiring team is floundering the next year…