Let the length of the chain hanging be 'l', and the linear mass density be \(\lambda\)
So the tension in the chain at the end of the table will be the weight of the chain that is hanging.
This weight is balanced by the friction force acting on the chain that is present on the table.
The frictional force is given by \(\mu(6-l)\lambda g\)
\(\Rightarrow \mu(6-l)\lambda g=\lambda l g\Rightarrow 0.5(6-l)=l\)
\(\Rightarrow l = 2m\)