In the question, a body P of mass 2 kg is placed on a table which has a horizontal frictionless surface. It is connected to one end of a string. The string passes over a pulley at the edge of the table and on the other end hangs a body Q with a mass m.
On releasing the bodies, they move with an acceleration equal to 0.81 m/s^2.
The body Q is being pulled downwards with a force equal to m*g. As g is given as 9.81, the force is 9.81*m. The force creates a tension in the string equal to m*g = 9.81*m
This tension moves the other body P which has a mass equal to 2 kg.
Equating the acceleration of the body to the force applied, we get the relation:
9.81*m = 2*0.81
=> m = 2*0.81 / 9.81
=> m = 0.165 kg
The body Q that is suspended freely at one end of the string has a mass 0.165 kg. The tension in the string is equal to 1.62 N.