First we must describe the process that occurs in this situation:
Firstly, the electric charge of sphere A will induce by influence, an electric charge on B and C, so both surfaces acquire an electric potential. When the spheres B and C are conected to the ground, through the switches, the potential of its surfaces is made equal to zero.
The field and the potential of the charged sphere, for points on the surface and the outside, is equal to the field and the potential of an electric charge which is located in the Centre of the sphere. So, the resulting potential due to the electric charges of A and B, at the intersection of the surface of the sphere B with the side of the triangle is as follow:
V = VQ + Vq = 0
VQ, is the potential due to charge Q
Vq, is the potential due to charge q, induced in the sphere B.
The expression of the electric potential of a charge is as follows:
V = q/4πԐ0r
r, is the distance between the charge and the point.
So we can write the following equation:
Q/4πԐ0(5a - 2a) + q/4πԐ0(2a) = 0
Q/4πԐ0(3a) = -[q/4πԐ0(2a)]
Q/3a = - q/2a
q = - (2/3)Q
So the sphere B acquires 2/3 of the electric charge of the sphere A, with opposite sign.
The same analysis can be performed for the sphere C and in this case, at the point of intersection between the surface of the sphere and the side of the triangle we have:
V = VQ + Vq = 0
Q/4πԐ0(5a - a) + q/4πԐ0(a) = 0
Q/4πԐ0(4a) = - [q/4πԐ0(a)]
Q/(4a) = - q/a
q = - (1/4)Q
So the sphere C acquires 1/4 of the electric charge of the sphere A, with opposite sign.