a^2+b^2-6a+10b+34=0
a^2-6a+9+b^2+10b+25=0
(a-3)^2+(b+5)^2=0
(a-3)^2=0,(b+5)^2=0
a=3,b=-5
a+b=3+(-5)=-2