The answer: the second option is better, and you will be rewarded for his udhiyah, because you helped him to do that.
His statement, “unless he exchanges it for something better,” means that this is permissible. Exchange is a type of sale, though a sale is usually conducted for cash, after which he purchases another sacrificial animal in its place. But if he exchanges it for something better—for example, if he has designated this sheep as an udhiyah, then finds that someone else has a sheep superior to it in fatness, size, and quality, and wishes to exchange it for the better animal—then there is nothing wrong with this. He has added something better, and there is no suspicion that he is reclaiming for himself anything from the ownership of this sacrificial animal.
Perhaps evidence for this may be drawn from the hadith of the man who said, “O Messenger of Allah, I vowed that, if Allah granted you the conquest of Makkah, I would pray in Bayt al-Maqdis.” He said, “Pray here.” The man repeated his question, and he said, “Pray here.” When the man repeated it a third time, he said, “Then do as you wish.” (1) This indicates that if a person substitutes an act of worship with something better, that is permissible and unobjectionable. Accordingly, if he exchanges it for something better, there is no blame in that. The textual evidence is the story of the man who vowed to pray in Bayt al-Maqdis, to whom the Prophet, peace and blessings be upon him, said, “Pray here.”
The rational evidence is that he has increased its goodness, because this is better, more beneficial to the poor, and generally more valuable.
It is understood from his statement, “unless he exchanges it for something better,” that if he sells it in order to purchase something better, this is not permissible. The author made an exception only for the case of exchange. Therefore, if he says, “I want to sell it and then buy something better,” we say: This is not permissible.