So the money on annies account can be solve using
F = P ( 1 + i)^n
Where f is the future money
P is the initial money
I is the interest rate
N in the number of months
At n = 0
F = 500
N = 1
F = 500 ( 1 + 0.02)^1
F = 510
N = 2
F = 500( 1 + 0.02)^2
F = 520.2
N = 3
F = 500( 1 + 0.02)^3
F = 530.6
N = 4
F = 500( 1 + 0.02)^4
F = 541.22