Let the tension in the rope be T. What must its value be, if the system is static?
To work out the force on the trolley, imagine that, the pulley is locked so that it can't rotate and that instead of going around the pulley, the rope is tied to cleats on the pulley at the two points where it goes from touching to not-touching the pulley. If the tension on both parts of the rope is still T, what will be the net force vector by which the two parts of the rope act on the pulley, and hence on the trolley?
Thank you, andrewkirk. After looking at the problem more closely, I saw that the rope tension in the downward direction could be broken down into components along the rotated axes of the incline. Since the tension in the rope is the same everywhere, I was able to solve for m2 by setting the sum of all forces in the rotated x-direction equal to zero.