Forces and tensions in the system: Apply Newton’s second law.
For the 2 kg block, along the incline:
\[ 2a = g \sin(30^\circ) = \frac{g}{2} \]
For the 4 kg mass:
\[ 4a = 2g \Rightarrow a = \frac{g}{3} \]