Plot summary
Kes finds herself living short periods of time in reverse order due to exposure to chronitons. She first gains consciousness in sickbay as an elderly woman, surrounded by her Ocampa family born on Voyager. The Doctor is able to put her into a biotemporal chamber to try to extend Kes's normally short life-span. Her next period of consciousness occurs some days before, where the Doctor has affirmed that Kes is suffering from mental deterioration due to her old age and his plans to use the biotemporal chamber. Kes finds it difficult to be around the members of her family whom she doesn't know.
During these periods, she comes to learn that Voyager had suffered a "Year of Hell" some years before when facing a race called the Krenim that repeatedly assaulted the ship as it crossed their space, costing the lives of Captain Kathryn Janeway and B'Elanna Torres along with significant damage to the ship. As Kes's periods of consciousness approach that point, she is able to work with the crew to postulate the nature of the Krenim temporal-based weapons, and how to reverse the effects she is experiencing using a biotemporal chamber. The Doctor surmises that if Kes can obtain the temporal phase shift that affected her, he would be able to stop her backwards progression in time.
Soon, Kes finds herself experiencing the period of the Year of Hell. The ship is significantly damaged, and an undetonated Krenim torpedo is lodged in the ship. Kes witnesses the deaths of Janeway and Torres. She examines the dangerous weapon. She discovers the phase shift (which is 1.47 microseconds) before passing out and coming to at an earlier period. Realizing she is getting near the time she first joined the Voyager crew, she is able to convince the Doctor of her symptoms and the means to stop it using the Krenim phase shift. However, even in the biotemporal chamber, she continues to flash back, soon finding herself back with the Ocampa and still growing younger. She regresses further to an infant, then to a fetus, before she suddenly starts moving forward in time.
She eventually comes to in the present, three years since she joined Voyager and shortly before the Year of Hell. The Doctor acknowledges the biotemporal chamber a success and Kes is cured.
Afterwards, during a celebration in the holodeck for Kes's birthday, the crew ask Kes for details about their futures. Kes declines, but says she will write a report on all the information she has on the Krenim. As Kes leaves the holodeck, Janeway tells her she does not have to write the report just then with Kes replying "there's no time like the present".
Credits
Adapted from Wikipedia contributors, Before and After (Star Trek: Voyager). Paragraphs and formatting adjusted; illustrations, reference markers, block quotations and non-story material omitted.