Board Thread:Questions and Answers/@comment-90.13.19.166-20161121190317/@comment-31417419-20170412144440

To make things clearer:

In the first timeline, Taki and Mitsuha switch bodies, being seperated by three years in time - Mitsuha in 2013, and Taki in 2016. In that timeline, Mitsuha is killed by the comet fragment, but Taki is able to remember.

At Kateware-doki or twilight, both are able to meet each other, it seems, in a place where time has either stopped or simply does not exist, until the real-time ends of the period are reached.

After which, both are transported back to their own timelines, and Taki quickly begins to forget because the history of Itomori's residents are quickly being re-written. So does Mitsuha, who attempts to resist the flow of time through mental strength of remembering Taki. She fails, but is able to give herself enough drive to confront her father and save the town.

However, there is a  mild paradox that happens here due to Musubi - Taki and Mitsuha are able to remember the sight of one another because of the logic of Musubi - that it controls time - that time weaves, and stretches, and reconverges again. Therefore, the ending is logical enough to happen.

Now that's a well-thought out plot! Haha!