You play the card as X’s last ability resolves, with one exception: You can’t play a land this way unless it’s your turn and you have an available land play. If you’re casting a spell this way, you do so as the ability resolves. Ignore any timing restrictions based on the card’s type. You can cast their sorceries or creatures during their turn, for example.