Since it's monthly compounding, we need to adjust our interest rate. 9% per year is .75% per month

We have:

Take the natural log of both sides:

months 19.983 years

Depending on how your answer needs to be, that's exact time. If you need exact years or months, you can do that to.

To check that, see what happens when you roll up 25,000 for 239.796 months @ .75%/month. That's your check and balance system.