Basically, you have block of mass m1 = 1.0 kg that is attached to a massless, ideal string. This string wraps around a massless pulley and then wraps around a second pulley that is attached to a block of mass m2 = 2.0 kg that is free to slide on a frictionless table. The string is firmly anchored to a wall and the whole system is frictionless.
1. m2 can move freely on the frictionless table because the pulley that wraps the string from the wall to m2 is "glued" onto m2. Since m1 is under the control of gravity and that m1 and m2 are connected via the string, m2 will move to the right.
2. Drawing a free body diagram for m2, you have 2 tension forces (T) in the positive x direction and one positive normal force (n), and one negative weight force (w)
Thus Fnetx= 2T = m_2*a_2 (the two Ts are equal in magnitude because you have massless string and by Newton's 3rd Law you know that the force exerted from the wall via the string onto m2 is the same as the force exerted by m1 via the string onto m2 ***notice that I'm only worried about forces exerted onto m2).
ok, so we know that T = (m_2*a_2)/(2)
We only need to worry about Fnetx and not Fnety because the block only moves in the z direction, thus it only has force in the x direction.
3. Drawing a force body diagram for m_1, we know that there is a T in the positive y and a w force in the negative y. Thus we only need to worry about Fnety.
Fnety = T-w_1 = T-m_1*g = m_1 * a_1
Notice again, that the T is the same T as exerted onto m_2 by the wall and by m_1. Now, its the tension exerted onto m_1 by m_2, via the string.
Force_wall onto m2 = Force_m1 onto m2 = Force_m2 onto m1 This is all true because of the massless string and massless pulley
Ok, back to Fnety. Solve for a1 and you get a_1 = (T-m_1*g)/(-m_1).
Let's define y_1(t) and x_2(t) as the vertical coordinate of the block of mass m_1 and the horizontal coordinate of the block of mass m_2 , respectively. Let's also define L as the length of string. Thus L = 2x_2(t) + 1y_1(t) + C (C is some constant that accounts for the length of string from the wall to the start of table). Okay, if you differentiate 2x to get to acceleration, you know that a1 = 2 a2.
So now you have a way to relate T, a_2, and a_1. You can solve for anything.
Hope this helps!