a. A:
, B:
, C:

When two conducting spheres touch, the charge on them is redistributed such that the potential on the two spheres is the same:

where Q refers to the charge and C to the capacitance of the sphere. For identical spheres, the capacitance is the same, so the previous equation becomes

which means that the charge distributes equally on the two spheres.
Here initially we have:
Sphere A: charge of q
Sphere B: charge of -q/2
Sphere C: charge of 0
At first, sphere C is touched to sphere B. Since the total charge of the two sphere was

After touching each sphere will have a charge half of this value:

Then sphere C (charge of -q/4) touches sphere A (charge of +q). So the total charge is

Since the charge distributes equally, each sphere will receive 1/2 of this charge:

So the final charge on the 3 spheres will be
A:
, B:
, C:

b. A:
, B:
, C:

At first, sphere C is touched to sphere A. Since the total charge of the two sphere was

After touching each sphere will have a charge half of this value:

Then sphere C (charge of q/2) touches sphere B (charge of -q/2). So the total charge is

Since the charge distributes equally, each sphere will receive 1/2 of this charge, which simply means a charge of zero:

So the final charge on the 3 spheres will be
A:
, B:
, C:
