The forces acting on mass are shown in the following figure.

From the above figure, the relation of forces on the horizontal direction is given by,
Here, is the mass of the first block, a is acceleration, g is the acceleration due to gravity, is the angle, T is the tension force, and is the kinetic friction due to the first block.
The kinetic friction is given by,
Here is the coefficient of kinetic friction and is the normal force.
Substitute for in the equation localid="1667647933442" , and we get,
Rewrite the equation as follows, and we get,
The forces acting on mass are shown in the following figure.

Similarly, from the above figure, the relation of forces on the horizontal direction is given by,
Here is the mass of the second block and is the kinetic friction due to the second block.
The tension force acts on the mass and are equal.
Substitute for g , 4 kg for , 8 kg for , for , 0.25 for , and 0.35 for in equation (1).
Therefore, the acceleration of each block is .