tensions in the vertical strings

A rigid, uniform, horizontal bar of mass m_1 and length L is supported by two identical massless strings. Both strings are vertical. String A is attached at a distance d < L/2 from the left end of the bar and is connected to the ceiling; string B is attached to the left end of the bar and is connected to the floor. A small block of mass m_2 is supported against gravity by the bar at a distance x from the left end of the bar, as shown in the figure.

Throughout this problem positive torque is that which spins an object counterclockwise. Use g for the magnitude of the acceleration due to gravity.

A). Find T_A, the tension in string A.
Express the tension in string A in terms of g, m_1, L, d, m_2, and x.

B). Find T_B, the magnitude of the tension in string B.
Express the magnitude of the tension in string B in terms of T_A, m_1, m_2, and g.

C). If the mass of the block is too large and the block is too close to the left end of the bar (near string B) then the horizontal bar may become unstable (i.e., the bar may no longer remain horizontal).

What is the smallest possible value of x such that the bar remains stable (call it x_critical)?
Express your answer for x_critical in terms of m_1, m_2, d, and L.