You confused two things. There is the Sun turning into red giant in 5 billion years consuming the Earth, and the Sun getting too bright for Earth to be habitable in 500 million years.
What gives you an impression that I am confusing these two things? Becoming a red giant is a long process and increased luminosity and radius are parts of this process.