We have (a+b+c)2=a2+b2+c2+2ab+2bc+2ca
Using this, we have
a(x2+4y2+1−4xy−4y+2x)+9(4x2+y2+4+4xy+4y+8x)−25=0
⇒(ax2+36x2)+(4ay2+9y2)+(a+36)+(−4axy+36xy)+(−4ay+36y)+(2ax+72x)−25=0
⇒(a+36)x2+(4a+9)y2+(a+36−25)+(−4a+36)xy+(−4a+36)y+(2a+72)x=0
⇒(a+36)x2+(4a+9)y2+(a+11)−4(a−9)xy−4(a−9)y+2(a+36)x=0
⇒(a+36)x2+(4a+9)y2−4(a−9)(xy+x)+2(a+36)x+(a+11)=0
⇒(a+36)x2+(4a+9)y2−4x(a−9)(y+1)+2(a+36)x+(a+11)=0