I will assume you meant 5% simple interest per annum.
Let x be the number of years needed.
The equation will be:
5000 + (0.05x)*(5000) = 2*5000
Solving it, we will get:
5000 + 250x = 10000
250x = 10000 - 5000
250x = 5000
x = 5000 / 250
x = 20
Hence, it will take 20 years for $5000 to double itself.