Heinley was scouting the castle in earlier chapters which hints, he might have been plotting to go to war with the Eastern Kingdom. Looking for weaknesses. Probably got derailed when he fell for our gal. So taking that into consideration, he likely had Elgy come over to sow discord from within. And Trashta was just the perfect tool, she was already sowing discord between the Emperor and Empress. This is shown when he tells Trashta what happened to the previous Emperor's concubine. He was the one who brought it up and the one who tells her what happened to the concubine in the end. It's kinda funny considering Trashta thought she was good at manipulating people too.