When Jamie goes north, the people who know that he pushed Bran out of the tower will not say anything. Bran is now the three eyed raven and is clearly beyond such concerns.
Jamie might have lost his hand but he is not as worthless as he seems. He is still a valuable fighter and Tyrion will welcome him with open arms. His help will be welcomed and it will flatter Danny. After all, he is one of Cersei's closest supporters, if he deserts her then that sends a message to her troops and the rest of Westeros.
Cersei will probably die in childbirth. Her kid will survive and will be raised by the northern family. This will be for personal reasons - Tyrion loved Tommen and Myrcela inspite of their mother, he could probably care for the new kid too - and for political reasons - the kid is the rightful heir to the throne for the Baratheon/Lannister supporters. Being raised by Danny as her heir will consolidate the kingdoms without war.
It will be kind of like queen Elizabeth of England and Mary queen of Scots. They hated each other but Mary's son was Elizabeth's heir and in the end, the kingdoms were united without bloodshed (sort of).