A= (4x-1)^2+(x+2)^2=(4x-1)*(4x-1)+(x+2)*(x+2)=4x*4x-4x*1-1*4x+1*1+x*x+x*2+2*x+2*2=16x^2-8x+x^2+2x+2x+4=18x^2+12x+4