Answer: 18 years
Work Shown:

The steps above show f(x) replaced with 5. Then you'd use logarithms to isolate the variable x. The relevant useful log rule is
so we can pull down the exponent.
From here it seems your teacher wants you to round up to the nearest integer.
If we plugged in x = 17, then f(x) = 4.99 which is one cent too small.
While x = 18 leads to f(x) = 5.19
Therefore, x = 18 has the price reach or exceed $5