The figure shows a 20 kg block resting on a frictionless surface and being pulled by a force F. On it rests a 5 kg block with the coefficient of friction between the 20 kg block and the 5 kg block being 0.5.
The force of the friction between the 5 kg block and the 20 kg block is F = mu*N = 0.5*5*10 = 25 N
If the lower block of 20 kg is pulled with a force equal to 25 N, the block placed above it does not slip.
The force exerted by a mass M on the string attached to the 20 kg block is equal to M*10. If this is equal to 25 N, M = 25/10 = 2.5 kg
The maximum mass that can be attached to the lower end of the string so that the 5 kg block does not slip is 2.5 kg.