It is clearly mentioned in the question that charge C is clamped ..
By observation we see that charge C should be between A and B.
Also note here that before introducing C ..A and B were repelling each othe..hence ..the charge C should attract A and B towards each other. ( finally A and B shud be at rest.)
Hence C shud be negatively charged.( A and B are positively charged a and 2q) ..let charge on C be -Q.
Now let C be at a distance x from A ..i.e. d-x distance from B.
C is clampled ..not bothering C ..
For A and B to be at rest ..the bet force on them should be zero.
Net force on A = kq(-Q)/x^2 + kq(2q)/d^2 = 0
hence .. Q/x^2 = 2q/d^2 ......(1)
Net force on B = k(2q)(-Q)/ (d-x)^2 + k(2q)(q)/d^2 = 0
hence .. Q/(d-x)^2 = q/d^2 ..(2)
From (1) and (2)
Q/ (d-x)^2 = Q/ 2x^2
2x^2 = (d-x)^2
root2.x = d-x
x(1+root2) = d
x = d / ( 1+root2)
putting value of x in any of the above ..u'll get the value of Q.