Two identical conducting spheres carrying different charges attract each other . . .

Question : Two identical conducting spheres carrying different charges attract each other with a force F when placed in air medium at a distance d apart. The spheres are brought into contact and then taken to their original positions. Now, the two spheres repel each other with a force whose magnitude is equal to that of the initial attractive force. The ratio between initial charges on the spheres is 

(A) -(3+√8) only
(B) -3+√8 only 
(C) -(3+√8) OR (-3+√8)
(D) -√8

Doubt by Gurdev

Solution : 
Let the initial charges be q1 and -q2.
Using Coulomb's Law
F=k|q1||-q2|/d²
F=kq1q2/d² — (1) 

When the two spheres are bought into contact with each other then new charge on them would be 
q1'=q2'=(q1-q2)/2

F=k|q1'||q2'|/d²
F=k[(q1-q2)/2][(q1-q2)/2]/d² — (2) 

Equating equation (1) and (2) 

kq1q2/d²=k[(q1-q2)/2][(q1-q2)/2]/d²
q1q2=(q1-q2)²/4
4q1q2=(q1-q2
(q1-q2)²=4q1q2
q1²+q2²-2q1q2=4q1q2
q1²+q2²-2q1q2-4q1q2=0
q1²+q2²-6q1q2=0

dividing both sides by q2²
q1²/q2²+1-6q1/q2=0
(q1/q2)²+1-6(q1/q2)=0

Let q1/q2=x
x²+1-6x=0
x²-6x+1=0
a=1
b=-6
c=1

D=b²-4ac
D=(-6)²-4(1)(1)
D=36-4
D=32

x=[-b±√D]/2a
x=[-(-6)±√32]/2(1)
x=[6±4√2]/2
x=2[3±2√2]/2
x=3±2√2
|q1/q2|=3±2√2
|q1/q2|=3±√8
q1/q2=(3±√8)/(-1)
q1/q2=-(3±√8)
q1/q2=-(3+√8) or (-3+√8)
Hence, (C) -(3+√8) OR (-3+√8), would be the correct option.