Given,
The mass of block B, M=0.4 kg
The mass of particle P, m=0.3 kg
The height at which the particle P is situated, h=0.8 m
As the pulley is smooth, the tension in the horizontal part and the vertical part of the string is the same and the acceleration of the particle and the block is the same.
The only force acting on block B is the tension in the string. Thus the net force on the block is given by,

Where a is the acceleration of the block and the particle and T is the tension in the string.
The forces acting on the particle are gravity and the tension in the string,
The net force on the particle is given by,

Where g is the acceleration due to gravity.
On substituting for T in the above equation,

On substituting the known values,

Thus the acceleration of the block B is 4.2 m/s²
On substituting the known values in the equation (i),

Thus the tension in the string is 1.68 N