Let the initial charges are q1 and q2.
In first case , F=kq1q2r2=−0.027 (minus sign due to attraction force)
or (9×109)q1q212=−0.027⇒q1q2=−3×10−12..(1)
When a conducting wire are connected them, the charge on each particle will be half of the total charge i.e (q1+q2)/2.
For repulsion, F=(9×109(q1+q22)212=0.009
or (q1+q2)2=4×10−12
or q1+q2=±2×10−6...(2)
A) From q1q2=−3×10−12 and q1+q2=+2×10−6, we get after solving q1=3μC and q2=−1μC
B) From q1q2=−3×10−12 and q1+q2=−2×10−6, we get after solving q1=−3μC and q2=1μC