a) #2x^2+16x+5#
#=>2[x^2+8x+5/2]#
#(color(red)a+color(blue)b)^2=a^2+color(green)2color(red)acolor(blue)b+b^2#
#=>2[color(red)x^2+color(green)2*color(blue)4color(red)x+color(blue)4^2-4^2+5/2]#
#=>2[(color(red)x^2+color(green)2*color(blue)4color(red)x+color(blue)4^2)-16+5/2]#
#=>2[(x+4)^2-32/2+5/2]#
#=>2[(x+4)^2-27/2]#
#=>2(x+4)^2-cancel2*27/cancel2#
#=>2(x+4)^2-27#
b) #6+4x−x^2#
#=>-1*[x^2-4x-6]#
#=>-1*[color(red)x^2-color(green)2*color(blue)2color(red)x+color(blue)2^2-2^2-6]#
#=>-1*[(color(red)x^2-color(green)2*color(blue)2color(red)x+color(blue)2^2)-4-6]#
#=>-1*[(color(red)x-color(blue)2)^2-10]#
#=>-(x-2)^2+10#
#=>10-(x-2)^2#