Let a be the acceleration of the system and T be the Tension in the string. Equations of motions for 5 kg and 2 kg blocks are
5g – T = 5a
T – 2g sin θ – f = 2a
where f = force of limiting friction
= µR = µ mg cos θ = 0.3 x 2 g x cos 30°
Solving (1) & (2) a = 4.87 m/s2