for 5kg block suppose it move"s downword
acc of 5kg blo & 4kg blocksare a1&a2
5g-2t=5a1______ 1
now for 4kg block
t-4g=4a2
t=4a2+4g______2
from constraint eqn
2a1=a2______3
now we put value of t in 1
so 5g-2(4a2+4g)=5a1
5g-8a2-8g=5a1
-3g-8a2=5a1
-3g-16a1=5a1 from 3
a1=-3g/21
a1=-g/7 nagative shows that it(5kg block) wiill moves upward
and a2=2g/14