Plan to save $5000 per year for retirement with first investment made 1 year from now.

Plan to earn 10% per year on investments.
Plan to retire in 43 years, immediately after making last $5000 investment.

a) if, instead, decide to withdraw $300,000 per year in retirement, with first withdrawal one year after retiring, how many years will it take until you exhaust your savings?

b)If you only save $1000 per year, but want to retire with $1 million in your investment account, how high of a return do you need to earn on your investments?

Thank you for helping me.