即√("(" 6"-" x_1 ")" ^2+"(-" y_1 ")" ^2 )=√("(" 6"-" x_2 ")" ^2+"(-" y_2 ")" ^2 ),
因为y_1^2=2px1,y_2^2=2px2,
所以(x1-x2)(x1+x2-12+2p)=0.
因为AB与x轴不垂直,
所以x1≠x2,
则x1+x2-12+2p=8-p-12+2p=0,
即p=4.
故抛物线方程为y2=8x.