The basic equation to use is
A = P * (1 + r)t
where P is the original principal, r is the interest rate per period, and t is the number of periods. Here we have 4% annual rate compounded monthly so
r = .04 / 12
and t is in months.
So we need to solve
12,000 = 9000 * (1 + (.04/12))t
or
(1.003333)t = 12000 / 9000 = 4/3
or, taking the logarithm of both sides
t * log(1.003333) = log(4/3)
from which
t = 86.45 or about 7 years and 3 months.