\(\left(x^2-3x+5\right)^2-7x\left(x^2-3x+5\right)+12x^2\)
=\(\left(x^2-3x+5\right)^2-2\left(x^2-3x+5\right)\frac{7}{2}x+\frac{49}{4}x^2-\frac{1}{4}x^2\)
=\(\left(x^2-3x+5-\frac{7}{2}x\right)^2-\frac{1}{4}x^2\)
=\(\left(x^2-\frac{13}{2}x+5\right)^2-\frac{1}{4}x^2\)
=\(\left(x^2-\frac{13}{2}x+5-\frac{1}{2}x\right)\left(x^2-\frac{13}{2}x+5+\frac{1}{2}x\right)\)
=\(\left(x^2-7x+5\right)\left(x^2-6x+5\right)\)
=\(\left(x^2-7x+5\right)\left(x^2-5x-x+5\right)\)
=(\(x^2-7x+5\))(\(x\left(x-5\right)-\left(x-5\right)\))
(\(x^2-7x+5\))\(\left(x-1\right)\left(x-5\right)\)