Since you have three blocks each attached by a string, you will have three different equations with which you can manipulate to solve for acceleration. First off, draw a picture and label all the forces acting on each block and label each tension. I assume that the rope connecting the block on the table passes over a frictionless pulley when connected to the hanging block on both sides. You then arbitrarily choose a direction for which you think the system will move. Logically you should pick motion to the right to be the positive direction. Therefore all the forces you labeled that point in this direction will be positive. After all this is done, you should be able to find three equations describing the motion of the system:
m(3)g-T(2)=m(3)a
T(1)-T(3)=m(2)a
T(4)-m(1)g=m(1)a
I let the mass on the left be m(1), the mass on the table be m(2), and the mass on the right be m(3). The tension pointing up from the left block is T(4), the tension pointing left of m(2) is T(3), the tension pointing right of m(2) is T(1), and the tension pointing up from m(3) is T(2). Since the pulley is frictionless, T(4)=T(3) and T(1)=T(2). From this you get:
T(3)=T(1)-m(2)a
T(4)= m(1)a+m(1)g
T(2)=m(3)g-m(3)a
You can then eliminate the tensions and solve for acceleration by:
T(1)-m(2)a=m(1)a+m(1)g
m(1)a+m(2)a+m(1)g=m(3)g-m(3)a
m(1)a+m(2)a+m(3)a=m(3)g-m(1)g
a=(m(3)g-m(1)g)/(m(1)+m(2)+m(3))