
According to the information given in the question, the part of the chain that envelopes the pulley is very small. Therefore, the acceleration of the chain can be written as,
a=(m2+m1)(m2−m1)g
Since a=2g
2g=(m2+m1)(m2−m1)g⇒2g=L(L−l)−lg⇒l=4L=xL
⇒x=4