"I will live in Berlin for five years."
Translation:Ich werde für fünf Jahre in Berlin wohnen.
I've got a shaky grasp of the concept myself, but what I'd read was that the preferred order is "Time, Manner, Place." This particular example question has a Time (for five years) and a Place (in Berlin), so the Time should come before the Place. Für fünf Jahre in Berlin wohnen.
Place manner time is also the preferred English order but one can change it and it rarely, if not never, makes a difference.
That's weird because in my A1 course for German I was told that German word order is very flexible and I don't see any flexibility in having to always follow the same pattern with every sentence.