A block B of mass 0.4 kg and a particle P of mass 0.3 kg are connected by a light inextensible string. The string passes over a smooth pulley at the edge of a rough horizontal table. B is in contact with the table and the part of the string between B and the pulley is horizontal. P hangs freely below the pulley (see diagram).
(i) The systemis in limiting equilibrium with the string taut and P on the point of moving downwards.
Find the coefficient of friction between B and the table. 
(ii) A horizontal force of magnitude X N, acting directly away from the pulley, is now applied to B.
The system is again in limiting equilibrium with the string taut, and with P now on the point of moving upwards. Find the value of X.