设圆为:x^2+y^2+dx+ey+f=0
代入A:1+4+d+2e+f=0,得:d+2e+f=-5
代入B:9+16+3d+4e+f=0,得:3d+4e+f=-25
消去e得:f=d+15
X轴上弦长:y=0时,得:x^2+dx+f=0
|x1-x2|^2=6^2=36=(x1+x2)^2-4x1x2=d^2-4f,得:d^2-4f=36
代入f得:d^2-4d-96=0
(d-12)(d+8)=0
得:d=12 or -8
d=12时,f=d+15=27,e=-(5+d+f)/2 =-22,方程为:x^2+y^2+12x-22y+27=0
d=-8时,f=d+15=7,e=-(5+d+f)/2=-2 ,方程为:x^2+y^2-8x-2y+7=0