We might think of a story as a system for the transfer of energy. Energy, hopefully, gets made in the early pages and the trick, in the later pages, is to use that energy. Marya was created unhappy and lonely and has become more specifically unhappy and lonely with every passing page. That is the energy the story has made, and must use.