I know this is an old one but I would give a third option in addition to the previous solutions, just to show another possible way of reasoning.
$$\frac{2x^3-9x^2+27}{3x^2-81x+162} = \frac{1}{3}\frac{2x^3-9x^2+27}{x^3-27x+54} = \frac{1}{3}\frac{(x^3-27x+54) + (x^3-9x^2+27x-27)}{x^2-27x+54} = \frac{1}{3}\left(1+\frac{x^3-9x^2+27x-27}{x^3-27x+54}\right)$$
Now we can factorize observing that $x^3-9x^2+27x-27 = (x-3)^3$ and using polynomial division by $x-3$ on the denominator and then factorizing we get $x^3-27x+54 = (x-3)(x^2+3x+18) = (x-3)^2(x+6)$. Plugging these where we left we finally get
$$ \frac{1}{3}\left(1+\frac{x^3-9x^2+27x-27}{x^3-27x+54}\right) = \frac{1}{3}\left(1+\frac{(x-3)^3}{(x-3)^2(x+6)}\right) = \frac{1}{3}\left(1+\frac{(x-3)^3}{(x-3)^2(x+6)}\right) = \frac{1}{3}\left(1+\frac{x-3}{x+6}\right) = \frac{2x+3}{3(x+6)}$$