Board Thread:Manga/@comment-151.231.104.172-20150824001325/@comment-5774380-20160927201813

Reiner said that there was no hope for Ymir even if she helped them, but that "together, they might be able to make something work [for Historia]". Ymir was also afraid that she wouldn't see Historia again and that's why she ruined their escape while trying to take her with them.

So taking this into account, my guess is that when they returned to the Hometown, the other warriors wanted to feed her to someone and take Marcel's power back, but Reiner and Bertolt interceded for her and managed to make a deal: to spare Historia's life and give her shelter in the Hometown, and to keep Ymir alive long enough for them to reunite one last time.

Assuming this, Ymir would be locked in a cell, and the letter would be a message from her telling Historia about the deal, and asking her to come with Reiner and Bertolt pacifically so they could be together before Ymir was killed; revealing also that this is the only chance for Historia's survival because the humans within the Walls are doomed and the Hometown plans to destroy them all. This revelation could also trigger the war against the Hometown of the next arc.