As the string is inextensible and the pulley is smooth the 3 kg block and the 20 kg trolley, both have same magnitude of motion to free body
Applying Newton's second law of motion to free body diagram of W = 20 kg
T − fk = 20a .....(i)
Now, fk = μkR = μkmg = 0.04 × 20 × 10
= 8N
∴ T − 8 = 20a ......(ii)
Again applying Newton's second law of motion to free body diagram of W = 3 kg we get
30 − T = 3a .......(iii)
Adding (ii) and (iii), we get
22 = 23a
a = \(\frac{22}{23}\) = 0.96ms−2
From (ii),
T = 20a + 8
T = 20 × 0.96 + 8
= 19.2 + 8
= 27.2N