If Renegade Doppelganger becomes a copy of a legendary creature, you will have to put one of them into the graveyard as a state-based action.
Renegade Doppelganger
If a creature enters under your control and Renegade Doppelganger's ability triggers, it can become a copy of that creature when the ability resolves even if that creature has left the battlefield by then. If it has, its last existence on the battlefield is checked to see what it was (specifically, if it was itself or if it was copying something else).
Noncopy effects that have already applied to Renegade Doppelganger will continue to apply to it after it becomes a copy of something else. For example, if Giant Growth had given it +3/+3 earlier in the turn, then it becomes a copy of Runeclaw Bear (a 2/2 creature), it will be a 5/5 Runeclaw Bear.
Magic: The Gathering · ™ & © Wizards of the Coast · Illus. James Ryman
Card data via Scryfall. Rarix is fan-made; not endorsed by the rights holders.
