You have to look at all the forces acting on the box, the downward force of gravity (mg) and the force along the rope. The force exerted by the rope has both an upward component ($12 \sin θ$) and a horizontal component ($12 \cos θ$). You will see that the upward component of the rope is less than the downward force of gravity, so there is no vertical component of acceleration (the difference in force is the upward reaction force of the table). Since there is no friction opposing the horizontal component of the rope force, the box will accelerate horizontally $$a=\frac{12\cosθ}{2}=3\frac{m}{s^2}$$ Hope this helps.