I have read that it takes billions of years for stars of approximately the size of the Sun to get through the main sequence, after which it will enter the red giant phase. When that happens, how long does it take for the star to balloon outward when it becomes a red giant?
It takes a star like the Sun about a billion years to go from the end of core hydrogen burning to the beginning of helium core burning. One might not call that entire phase a red giant phase, however, because the puffing out process takes quite a while to get going. In the mean time, the star is what is called a "subgiant," rather than a red giant, and physically the difference is that in a full-blown red giant, the electrons in the core have lost so much heat that they are approaching close to their quantum mechanical ground state. This implies the core is very small, about the size of the Earth, so a lot of heat must be lost before the star gets to that state.
After that, we can say the star is a red giant, but it won't be all that large until the core builds up more mass. A ball of electrons near their ground state will shrink as more mass is added to it, and as the core shrinks, the electrons gain kinetic energy, and importantly, so do the helium ions. When the core mass gets large enough, the helium gets enough kinetic energy to start fusion, and that's the end of the red giant phase. The star ceases to expand and instead contracts to the "horizontal branch." Most of the huge expansion occurs near to the end of that process, so the Sun will look like a red giant for less than perhaps 100 million years, depending on how big and red you want it to be in order to count. A reasonable source is https://www.space.com/22471-red-giant-stars.html.