Answer: $\large\frac{1}{3}$$g$

When the bodies are released, the heavier one moves downward and the lighter one moves upward.

Net force in the direction of motion of $m_1$ is $F_1 = m_1g - T$ which is equal to $m_1a$ as per Newton's second law.

Net force in the direction of motion of $m_2$ is $F_2 = T-m_2g $ which is equal to $m_2a$ as per Newton's second law.

Solvingfor acceleration, $a \rightarrow a = \large\frac{m_1-m_2}{m_1+m_2}$$g$

Substituting for $a$ and solving for $T$, we get $T = m_2 (a+g) = m_2 (g \large\frac{m_1-m_2}{m_1+m_2}$$ + g)$$= \large\frac{2m_1m_2}{m_1+m_2}$$g$

$\quad a = \large\frac{2m_2 - m_2}{2m_2+m_2}$$g = \large\frac{g}{3}$