Has lived vs. lived
Solution 1:
Both are correct, they just have different meanings: - "she has lived in Berlin for 2 years" means she is still living there, and it's been 2 years since she started living there. - "she lived in Paris for 2 years" means it was in the past, but not in the present any longer. Like "When she was a student she lived in Paris for 2 years, now she lives in Berlin".