Answer: $d_1 = -192.4m,\; d_2 = 161.3\;m$

This is an example of an Atwood's machine shown below, where $m_1 = 12\;kg$ and $m_2 = 10\;kg$.

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.

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

$\Rightarrow a = \large\frac{12-10}{12+10}$$\times 9.8 = 0.89 \;m/s^2$

Since the acceleration is constant, the common speed at the end of 3 s can be got from the Kinematics equation $v = v_0 + at = 0 + 0.89 \times 3 = 2.67 \;m/s$ (Note $v_0 =$ initial velocity $= 0$)

If the string is cut, the masses fall freely with initial velocities $+2.67 m/s$ and $-2.67 m/s$ respectively for $m_2$ and $m_1$

For mass $m_1$, the displacement in time $t=6s$ is given by the Kinematics equation, $y_1 = v_1t - \large\frac{1}{2}$$ gt^2$

$\Rightarrow$ downward distance traveled by $m_1$ is $d_1=(-2.67 \times 6) - (\large\frac{1}{2}$$ 9.8 \times 6^2) = -192.4 m$

Now $m_2$ travels upwards for a distance of $d = \large\frac{1}{2}$$ \large\frac{v^2_2}{g}$$ = \large\frac{2.67^2}{2 \times 9.8}$$ = 0.4\;m$ before coming to a stop and then falls downward.

For mass $m_2$, the time of travel upwards before coming to a stop is $\large\frac{v_2}{g}$$ = \large\frac{2.67}{9.8}$$ = 0.27 s$

Therefore it travels downwards for $6 - 0.27 = 5.73 s$. The distance it covers is $d = | \large\frac{1}{2}$$ (-g) (t^2) | = \large\frac{1}{2}$$ 9.8 \times 5.73^2 = 160.9 m$

$\Rightarrow$ the total distance covered by mass $m_2$ is $d_2=0.4 + 160.9 = 161.3\;m$