a) x^2+2*x*3+3^2 + x^2-2*x*1+1^2 - 2x^2=
=2x^2+6x+9-2x+1-2x^2=
=4x+10
b) (2x)^2+2*2x*7+7^2-[(3x)^2+2*3x*5+5^2]+2x+5=
= 4x^2+28x+49-9x^2-30x-25+2x+5=
= -5x^2+29.
c) x^2-2*x*4+4^2-x^2+3^2+2(x^2+2x+1^2)=
= x^2-8x+16-x^2+9+2x^2+4x+2=
= 2x^2-4x+27.
d) (2x)^2-2*2x*3-3^2-4(x^2-6^2)+x^2-9^2+x^2=
= 4x^2-12x-9-4x^2+144+2x^2-81=
= 2x^2-12x+54
e) 25x-1-16x^2-24x-9+2(9x^2-6x+1)=
= 25x-1-16x^2-24x-9+18x^2-12x+2=
= 2x^2-11x-8
f) 9+12x+4x^2-x^2+4+4x^2-24x-9=
= 7x^2-12x+4
g) 36x^2-1-9x^2+9+12x^2-84x+147=
= 39x^2-84x+146.