Let first term and common difference of an AP are $a$ and $d$.
$\therefore T_{3}=a+2 d$
$T_{7}=a+6 d$
and $T_{12}=a+11 d$
But $T_{3}, T_{7}$ and $T_{12}$ are consecutive terms of an GP.
$\therefore (a+6 d)^{2}=(a+2 d)(a+11 d)$
$a^{2}+36 d^{2}+12 a d=a^{2}+13 a d+22 d^{2}$
$a d=14 d^{2}$
$\Rightarrow a=14 d$
$\therefore $ Terms are $14 d+2 d, 14 d+6 d, 14 d+11 d$
i.e., $16 d, 20 d, 25 d$
$\therefore $ Common ratio $=\frac{20 d}{16 d}=\frac{5}{4}$