Dear Nikhil
Let the lengths of the two strings be equal to 'L'
The distance between the two pith balls will be, r = 2Lsinθ
now, here
electrostatic force = gravitational force
kq2/r2 = mgtanθ
or
kq2 / (2Lsinθ)2 = mgtanθ
or
m = kq2 / gtanθ(2Lsinθ)2
thus,
mass of each ball will be
m = kcosθq2 / 4gL2(sinθ)3
Regards
Arun (askIITians forum expert)