When they are connected by a conducting wire, finally charge on each will be half of total charge on both. Let q be the final charge on each, then q=12−182=−3nC
Using Coulomb's law, F=14πϵ0q2r2=(9×109)×(3×10−9)2(0.3)2=9×10−7N (positive sign for repulsive force)
So, n=9.