Step1: Find the acceleration of the blocks.
For the mass of 4 kg,
4g−T=4a …(i)
For the mass of 1 kg
T−g=a …(ii)
From the equation (i) and (ii)
3g=5a
⇒a=3g5
Relative acceleration =2a=6g5
Step2: Find the time taken by the blocks to cross each other.
Formula Used: s=ut+12at2
From 2nd equation of motion
s=ut+12at2 …(iii)
(∵Blocks starts from rest, therefore u=0)
Substituting the values in equation (iii), we get
6=12×6g5×t2
⇒t2=1
⇒t=1 s
Final Answer: 1