This is basically an Atwood Machine.
The basic strategy is to draw two free body diagrams for each mass. If we say mass m1 > m2 then m2 will accelerate up.
We can now create two equations with two unknowns T for tension and a for acceleration
For the heavier mass we get
m1a = m1g - T
for the other mass we get
m2a = T - m2g
From this you can derive an expression for the tension T

John B.
06/30/20
JH K.
Sorry, I did not phrase my question very clearly. My question was to express the tension in terms of the angles between the strings and the vertical, or preferably, in terms of time, when the balls are falling. I would also like to clarify that, if the balls are of different masses, wouldn't they not come to equilibrium at all, and keep moving until the lighter ball is at the pivot?07/01/20
JH K.
Hi, thank you for responding. However, doesn't the tension not always act opposite to gravitational force, as the string is at an angle to the horizontal, so the acceleration is not only upward?06/30/20