a^2+2a+b^2-6b+10=0
a^2+2a+1+b^2-6b+9=0
(a+1)^2+(b-3)^2=0
因为(a+1)^2和(b-3)^2都非负,所以(a+1)^2=0,(b-3)^2=0
即a=-1,b=3,ab=-3