a: Ta có: \(\left(3x-1\right)^2-2\left(5x-2\right)^2-2\left(x^2+x-1\right)\left(x-1\right)\)
\(=9x^2-6x+1-2\left(25x^2-20x+4\right)-2\left(x^3-x^2+x^2-x-x+1\right)\)
\(=9x^2-6x+1-50x^2+40x-8-2\left(x^3-2x+1\right)\)
\(=-41x^2+34x-7-2x^3+4x-2\)
\(=-2x^3-41x^2+38x-9\)
b: Ta có: \(\left(3a+1\right)^2+2\left(9a^2-1\right)+\left(3a-1\right)^2\)
\(=\left(3a+1+3a-1\right)^2\)
\(=36a^2\)