pulley
acceleration of the system as a whole (sign convenctions can be assigned to our wish.usually up,right +tive down,left -tive)
a=total force acting/total mass = 5 g/(5+45)=1 Newton.tension in the string is due to the its elastic forces.T=m1*a=45*1=45 Newton
equations: m2g-t=m2a...