Answer
$\frac{T_1}{T_2} = \frac{m_1}{m_1+m_2}$
Work Step by Step
Let $a$ be the acceleration of the system.
We can find an expression for the tension $T_1$:
$T_1 = m_1~a$
We can find an expression for the tension $T_2$:
$T_2 = (m_1+m_2)~a$
We can find an expression for the ratio $\frac{T_1}{T_2}$:
$\frac{T_1}{T_2} = \frac{m_1~a}{(m_1+m_2)~a} = \frac{m_1}{m_1+m_2}$