Remember that
The compound interest formula is equal to

where
A is the Final Investment Value
P is the Principal amount of money to be invested
r is the rate of interest in decimal
t is the Number of Time Periods
n is the number of times interest is compounded per year
in this problem we have
Part 1
P=$40,000
r=3.5%=3.5/100=0.035
n=52 (in one year there are 52 weeks)
t=6 years
substitute

Part 2
we have
P=$40,000
r=3.2%=3.2/100=0.032
n=365 (in one year there are 365 days)
t= 6 years
substitute

therefore
The answer is
The account that pays 3.5% compounded weekly