Detailed Instructions: You are given a sentence in Japanese. Your job is to translate the Japanese sentence into English.
Problem:彼の両親がラゴスに引っ越したとき彼はロンドンで勉強をしていてその後ベルリンに来ました
Solution:

Show your work and conclude with the exact phrasing "Therefore, the final answer is [answer]." where [answer] is just the final number or expression that solves the problem.
user
When his family moved to Lagos, he studied in London, then came to Berlin.