Is it illegal to take the story of someone who told your story and tell it in your own way?
Let's imagine an alternative Universe. In that universe, I am George Martin, creator of Games of Thrones, I signed a deal and HBO hired 3 people to write 20 seasons, my books cover only the first 10 seasons, so HBO writes the 10 missing ones, and then I decide to take the story told in the other 10 seasons and use the same story to complete my book series.
Can I get sued for that? Taking the script as it is for the 10 later seasons and using it to complete the book series seems like a copyright infringement, but I am wondering how the law would treat cases like these.
What should George Martin from the alternate universe do? How much can George Martin take from the second half of the story, not written by him?