She already has his heart. Erudian has been falling for her little by little from the start. The only thing holding him back is the thought that she's not being serious about her feelings for him (when she proposes to him on the prologue scene and he rejects her, he only does so because he feels that she's only doing that because she has other motives, not because she really loves him, which is kind of true).
They only get together after Erudian rejects her a few more times and Yeni actually feels hurt by his rejection and realizes she has genuine feelings for him. But, by the time that happens, she overhears Soleia and Erudian talking. Soleia offers a deal with Erudian: if he marries her, she'll stop trying to kill Yeni and she will also give him control over her and The Tower, that way he will be able to keep her "on a leash". After Yeni overhears this, she realizes that if she remains by his side, she will be the burden that will make him marry Soleia. So, she decides to leave his Palace and go stay at the Temple until it's time for her to return to Lebovny (she's safer at the Temple because of the Divinity there). The night before she leaves for the Temple, she has a conversation with Erudian on her room's balcony (that is right besides his, so he just jumps over to her side). That night, Yeni takes advantage of the fact that Erudian's drunk and finally manages to destroy the wall around his heart and he admits that he cares for her and finally calls her by her name for the first time. But still, they kind of have an unspoken deal that even though they care for each other, they should let the other go. Next day, Yeni leaves for the Temple anyway, but their relationship changes. Erudian becomes really open about his feelings and starts visiting her at the Temple because he misses her. Their skinship also gets stronger.
Their first kiss happens a little later on though. Belgoth receives some soldiers from Lebovnny (one of them being Sergey, Yeni's childhood friend) and Erudian gets jealous and kisses her. After this point, they're finally together (after Erudian finally decides to be "selfish" and keep her by his side even though Belgoth's land isn't good for Yeni's health. This was also one of the major motives that Erudian always held back his feelings).
Regarding Soleia, of course, she's defeated.
Sorry about the long spoiler.