To determine the ratio of the masses \( \frac{m_1}{m_2} \), we start by analyzing the forces acting on the two-block system connected by a string over a frictionless pulley. The system's acceleration is \( a = \frac{g}{\sqrt{2}} \). By applying Newton's second law, we consider the forces on each block:
For \( m_1 \):
\( T - m_1g = m_1a \)
\( T = m_1(g + a) \)
For \( m_2 \):
\( m_2g - T = m_2a \)
\( T = m_2(g - a) \)
Equating the expressions for \( T \):
\( m_1(g + a) = m_2(g - a) \)
Substituting \( a = \frac{g}{\sqrt{2}} \):
\( m_1\left(g + \frac{g}{\sqrt{2}}\right) = m_2\left(g - \frac{g}{\sqrt{2}}\right) \)
Simplifying gives:
\( m_1\left(1 + \frac{1}{\sqrt{2}}\right) = m_2\left(1 - \frac{1}{\sqrt{2}}\right) \)
Dividing both sides by \( g \), we obtain:
\( m_1\left(\frac{\sqrt{2}+1}{\sqrt{2}}\right) = m_2\left(\frac{\sqrt{2}-1}{\sqrt{2}}\right) \)
The ratio \( \frac{m_1}{m_2} \) becomes:
\( \frac{m_1}{m_2} = \frac{\sqrt{2}-1}{\sqrt{2}+1} \)
This matches the provided correct answer: \( \frac{\sqrt{2} - 1}{\sqrt{2} + 1} \).