\(A=x^2-6xy+9y^2\)
\(=x^2-2.x.3y+\left(3y\right)^2\)
\(=\left(x-3y\right)^2\)
\(B=x^3+6x^2y+12xy^2+8y^3\)
\(=\left(x+2y\right)^3\)
\(C=x^3-64\)
\(=\left(x-4\right)\left(x^2+4x+16\right)\)
\(D=125x^3+y^3\)
\(=\left(5+y\right)\left(25-5y+y^2\right)\)