Answer: (a) Smaller charge is
and larger charge is
.
(b) Smaller charge is
and larger charge is
.
Explanation:
(a) When both the spheres have same charge then force is repulsive in nature as like charges tend to repel each other.
Therefore, total charge on the two non-conducting spheres will be calculated as follows.

= 
Therefore, force between the two spheres will be calculated as follows.
F = 
12 N = 

or, 



This means that smaller charge is
and larger charge is
.
(b) When force is attractive in nature then it means both the charges are of opposite sign.
Hence, total charge on the non-conducting sphere is as follows.


Now, force between the two spheres is calculated as follows.
F = 
12 N = 



Hence, smaller charge is
and larger charge is
.