We are going to use the formula for the compound interest, which is

A = the future value of the investment
P = the principal investment amount (the initial deposit or loan amount)
r = the annual interest rate (decimal)
n = the number of times that interest is compounded per unit t
t = the time the money is invested or borrowed for
Replacing the values in the first question we have:

Answer for the first question is : $7140
Then, replacing the values in the second question we have:

Answer for the second question is : $8497