In solving this type of problem, there is a four step method.
Step no1 Identify the system ( body on which the equn F=ma is to be applied)
Step no2 List all the forces acting on the system.
Step no3 Draw a free body diagram ( a diagram in which we consider the body under consideration as a point and show all forces by lines in proper direction)
Step no4 Finally appply the equn F=ma
now let us take an example :
Q. The inclined plane forms an angle alpha=30 with the horizontal table.The mass ratio m2/m1=2/3.The coefficient of friction betn the body m1 and the inclined plane is equal to
=0.10.The masses of the pulley and the threads are negligible.Find the magnitude and the direction of acceleration of the body m2 when the formerly stationary system of masses starts moving.