Step 1: Let the A.P. have first term $a$ and common difference $d$.
\[
\text{2nd term} = a+d,\quad
\text{5th term} = a+4d,\quad
\text{9th term} = a+8d
\]
Step 2: Since these three terms are in G.P., the square of the middle term equals the product of the other two:
\[
(a+4d)^2 = (a+d)(a+8d)
\]
Step 3: Expand both sides:
\[
a^2 + 8ad + 16d^2 = a^2 + 9ad + 8d^2
\]
Step 4: Simplify:
\[
ad - 8d^2 = 0
\]
\[
d(a-8d)=0
\]
Step 5: Since the A.P. is non-constant, $d \neq 0$, hence:
\[
a = 8d
\]
Step 6: Substitute $a=8d$ in the terms:
\[
\text{2nd term} = 9d,\quad
\text{5th term} = 12d,\quad
\text{9th term} = 16d
\]
Step 7: The common ratio of the G.P. is:
\[
r=\frac{12d}{9d}=\frac{4}{3}
\]