When he was well-nigh forty years old (Hōs eplērouto autōi tessarakontaetēs chronos). A rather awkward Greek idiom for the English: “When a forty year old time (same idiom in Act 13:18 and only twice in the N.T.) was being fulfilled (eplērouto, imperfect passive) for him (dative case).” The life of Moses is divided into three periods of forty years each (in Egypt 40 years, in Midian 40, governed Israel 40, 120 when he died, Deu 34:7).
It came into his heart (anebē epi tēn kardian autou). Second aorist active indicative of anabainō, common verb. Came up as if from the lower deeps of his nature. This Hebrew image occurs in Jer 3:16; Isa 65:17; 1Co 2:9.
To visit (episkepsasthai). First aorist middle infinitive of episkeptomai, old verb to go to see for oneself, with his own eyes, to help if possible. Used of God visiting his people (Luk 7:16). Our “visit” is from Latin video, to see, visito, to go to see. During the Welsh mining troubles the Prince of Wales made a sympathetic visit to see for himself the actual condition of the coal miners. Moses desired to know first hand how his kinsmen were faring.