To calculate the final amount on an account with compound interest you have to use the following formula:
Where
A is the accrued amount
P is the principal amount
r is the interest rate expressed as a decimal value
t is the time involved
n is the number of compounding periods per unit of t.
In this exercise, the account compounds weekly, there are 52 weeks in one year, so per year, there will be 52 compounding periods → n=52
The principal amount is the money you want to invest P=$6234
To express the interest rate as a decimal value you have to divide the given percentage by 100
And the time lapse of the investment is t=25 years
Replace the formula with the data to calculate the accrued
The total amount after 25 years is the accrued amount plus the principal investment