Simple Interest is calculated using the formula: $I=PRT$
where $P$ is the starting princple, $R$ is the interest rate in decimal form, and $T$ is time in years.
Thus, the final balance after after adding interest is:
$P + PRT = P(1 + RT) $
Let $P_{A} $ represent Andrew's principle. Let $P_{L}$ represent Laurie's principle. We can start by finding when their balances will be equal. Essentially, any time after that Andrew will have more money since he has a higher interest. So we set their equations equal to each other and solve for $T$:
$P_{A}(1 + .08T) = P_{L}(1 + .05T) $
$40,000(1 + .08T) = 60,000(1 + .05T) $
$1 + .08T = 1.5(1 + .05T) $
$1 + .08T = 1.5 + .075T $
$ .005T = .5 $
$ T = 100 $
Thus, after 100 years Andrew will have more money. (However, banks typically use compound interest).