If the prosecutor (P) knows or strongly believes based on this new evidence that A is innocent, ethically P should start proceeding to have A's conviction reversed or reviewed. But in far too many cases P does nothing of the sort.
If P simply files a charge against B and proceeds to try B for the crime, P leaves it open to B's Lawyer to ask "Didn't you already convict A for this crime? what about that?" as part of a defense, which might well embarrass P and lose the case.
So P may well choose to file charges against B claiming that A & B acted together as accomplices, even if this requires misstating the evidence, or suppressing part of it.
Or, P may simply ignore the new evidence, leaving A in prison and B free. This is unjust, but requires no effort on the part of P, and may seem less likely to raise embarrassing questions about why P got the case against A wrong. P can always claim that s/he did not believe the new evidence. That might even be true, there is such a tendency to believe what we wish to believe.
The relative frequency of these responses on the part of those in the position of P here is really not possible to asses. The last two responses involve P suppressing or at least burying relevant evidence, and unless it is brought to the attention of others who publicize it enough that action is taken, it will not be generally known and cannot be tabulated in any statistics. P's office will certainly not respond to any survey which asks "How many times this year did you suppress the true facts to leave in place an unjust conviction you had previously obtained?"