Moses PBUH worked for his father in law for ten years (his term of service), then he left Midian with his wife family to return to Egypt to see his mother whom he missed.
(Then you stayed for a number of years among the people of Midian. Then you came here as pre-destined, O Moses!) (Ta-Ha 20:40)
بقي موسى في خدمة أبي وزوجته عشر سنوات ثم أشتاق لأمه فأخذ زوجته و أهله و خرج من مدين باتجه مصر
فَلَبِثْتَ سِنِينَ فِي أَهْلِ مَدْيَنَ ثُمَّ جِئْتَ عَلَىٰ قَدَرٍ يَا مُوسَىٰ )طه 20: 40