How long would you have to leave $407 in the bank at a 6% interest rate to earn $170.94?

simple interest:

170.94 = 407(.06)t
t = 170.94/(407(.06)) = 7 years

compound interest:
so you need 170.94 + 407.00 accumulated

407(1.06)^t = 577.94
1.06^t = 1.42
log 1.06^t = log 1.42
t log 1.06 = log 1.42
t = log 1.42/log 1.06 = 6.02 years <----- the more realistic answer