The force diagram of the given system is shown below:
where,
N: normal force = Wy
Wy: component of the weight W perpendicular to the incline = Wcosθ
Wx: component of the weight W parallel to the incline = Wsinθ
W: weight of block 1 = m1*g
W2: weight of block 2 = m2*g
T: tension on the cord
Fr: friction force = μN
i) The acceleration of the two blocks is the same.
The sum of forces on the first block along the direction of the incline is (equation 1):

The sum of forces along the direction perpendicular to the incline is (equation 2):

The sum of forces on the second block is (equation 3):

Now, add the first and third equation, solve for a, and replace the expression for N, as follow:

The previous expression is the result for the acceleration of the two blocks.
ii) And the tension is:
