When a person has committed the same crime in several states, it’s fairly common for the various prosecutors to consult with each other to decide who should take the lead on prosecuting him. Factors include which specific one will be easiest to prove in court (most evidence), and which state has the most appropriate penalties in their laws.
Personal elements can enter into such discussions. Nearly every prosecutor wants to win a case against a notorious criminal, but they have to weigh that against the expense in their budget of a major prosecution case, and the expense to their state of a long term of prison (or not. Sometimes a capital case is specifically charged in a state that has capitol punishment).
Note that any such discussion among prosecutors is all voluntary.
Any one of them (or all of them) can decide on their own to file charges against the criminal, without regard for the others. The prosecutor who actually has the criminal in their own jail has an advantage, but any of the others can seek to have him extradited to their state (at their expense). Generally, they come to an agreement.
But the others can just wait (as long as the statue of limitations allows, and for murders it is forever) to see what happens in the other states’ prosecution. If theydon’t think the sentence is long enough, or if they think the criminal might be paroled, they can then initiate their own prodecution for the same crime done in their state. Even years later.