Khadija died three years before the Prophet ﷺ departed to Medina. He stayed there for two years or so and then he married ʿAisha when she was a girl of six years of age, and he consumed that marriage when she was nine years old.
تُوُفِّيَتْ خَدِيجَةُ قَبْلَ مَخْرَجِ النَّبِيِّ ﷺ إِلَى الْمَدِينَةِ بِثَلاَثِ سِنِينَ فَلَبِثَ سَنَتَيْنِ أَوْ قَرِيبًا مِنْ ذَلِكَ وَنَكَحَ عَائِشَةَ وَهْىَ بِنْتُ سِتِّ سِنِينَ ثُمَّ بَنَى بِهَا وَهْىَ بِنْتُ تِسْعِ سِنِينَ