Let, λ=mass per unit length of the chain and length of mass hanging through the table is x.

Normal force applied by the table on the chain will be, N=(l−x)λg.
Tension developed in the chain will balance the gravitational force acting in the downward direction, T=λxg.
Maximum limiting force possible for the part of the table, fmax=μN=μ(l−x)λg
For equilibrium,
fmax=T,
⇒μ(l−x)λg=λxg⇒21×(6−x)=x⇒x=2m