We have already learned (see Bava Batra 125) that a person can give a gift to another and retain the rights to determine who will get it after the recipient passes away. Our Gemara quotes a baraita that teaches in a case where someone says “I am giving you this property and afterwards it should go to so-and-so,” the Tanna Kamma says that the second recipient will get the property, even if it has been sold to a third party. Rabban Shimon ben Gamliel argues, ruling that it will only transfer to the second person if it is still in the hands of the original recipient. If he has sold it or destroyed it, the second person will only get what remains.
Several of the amora’im in the Gemara agree that the halakha follows Rabban Shimon ben Gamliel. Nevertheless, Abaye states that someone who recommends to the first person to sell the property is considered a rasha arum – a cunning wicked person.
The Rashbam explains that he is a rasha (a wicked person) because he negates the wishes of the person who gave him the gift, and he is arum (cunning) because he can successfully arrange for the gift to end up in the hands of another. He adds that Abaye only applies this appellation to someone who advises to do this. The person who does it, who is simply looking out for his own interests, would not be considered a rasha for doing this.
Rabbi Yoḥanan limits Rabban Shimon ben Gamliel’s ruling to an ordinary sale, but if the person tried to give the property away to a third party at the time of his death via a matnat shekhiv me-ra – a gift given by a person on his deathbed – then it would not affect the transfer of ownership to the second person. Abaye explains that such a gift takes effect only after death, and by that time the original transfer has occurred and the dead man has no ability to transfer the property.