During its final days as a red giant, the Sun will reach a peak luminosity of about 3000LSun. Earth will therefore absorb about 3,000 times as much solar energy as it does now, and it will need to radiate 3,000 times as much thermal energy to keep its surface temperature in balance.
Estimate the temperature Earth's surface will need to attain in order to radiate that much thermal energy. You will need to use the formula for emitted power per unit area. (Assume that Earth's temperature today is around 300 K.)