Megasporangium, also known as the ovule, is the part of the plant that contains the female gametophyte and produces the megaspore, which gives rise to the egg cell.
The generative cell (3) is part of the male gametophyte (pollen grain), not the megasporangium (female side). It divides to form the two sperm cells that fertilize the egg and the central cell in the ovule.