(1) He stayed in Japan for three years before moving back with his family to Germany .
(2) He remained in Japan for three years before moving back to Germany with his family .

Do these two sentences mean the same thing?
yes