It's a doubling time question, so the formula will have the form of y = a(2)^(x/t). Y is the present amount; a is the initial amount; x is the number of year; t is the period of doubling time.
So now you just plug in values:
y = 5000(2)^ (36/12)
y = 5000(2^3)
y = 5000 (8)
y = 40 000
And it's the same for the second part (just with 48 instead of 36):
y = 5000(2)^ (48/12)
y = 5000(2^4)
y = 5000 (16)
y = 80 000