Auto-translated
They are the same, but you need to consider that a hero of the same class as the one in the second slot will never appear. That is, if there is already a native hero in the tavern, if you redeem another hero instead of him, the probability of a new native hero appearing will be twice as low as usual (since one of the two classes is blocked). At the same time, the probability of a native hero appearing in the Hall of Heroes is 1/9, regardless of the number of heroes already owned or in prison (with the exception of the case when all heroes of a certain class are occupied) - because first a class is randomly selected - with equal chances for each, and then a random hero from the selected class.
If you need to redeem a specific hero, you need to consider that the probability of his appearance will be higher the fewer heroes of that class are available to appear in the tavern. For example, if the goal is to redeem Gunnar, it makes sense not to dismiss the redeemed Lords, as this will increase the chance of Gunnar appearing. Heroes of other classes can be dismissed without worry; their availability in the tavern will not affect the chance of Gunnar appearing (with the exception of the situation when, before the dismissal, no hero of the dismissed class was available for generation in the tavern).