This is a common time value of money question, specifically the future value of an annuity payment. Annuities are just payments that are fixed each time period. The question state you are going to be depositing a fixed amount ( $5,000) each year into an account. The compounding period is also annually.
Therefore, you will use this formula to solve for the future value:
FV = C [ (1+r)n -1]
r
FV = Future value
C= Cash payment
r = interest rate
n = number of periods
So when you plug in the variables:
FV = 5000 [ (1.03)30-1/ .03]
FV = 237,877.08
Hope this helped!