Answer
$3x(y-3)^2$
Work Step by Step
$3xy^2-18xy+27x\longrightarrow$ 3x is a common factor.
$3x(y^2-6y+9)$
=$3x(\ \ \ \ \ \ \ \ \ )(\ \ \ \ \ \ \ \ \ )$
=$3x(y\ \ \ \ \ \ \ )(y\ \ \ \ \ \ \ )$
=$3x(y-\ \ )(y-\ \ )$ Since the 2nd term is negative and the 3rd is positive, the factors of 9 must both be negative.
=$3x(y-3)(y-3)$ -3 and -3 have a sum of -6 and a product of 9.
Since $y-3$ is repeated as a factor it is written as an exponent.