Answer
$z^3-9z^2+27z-27$
Work Step by Step
Using $(a\pm b)^3=a^3\pm3a^2b+3ab^2\pm b^3$ or the cube of a binomial, the expression, $
(z-3)^3
,$ is equivalent to
\begin{array}{l}\require{cancel}
(z)^3-3(z)^2(3)+3(z)(3)^2-(3)^3
\\\\=
z^3-3(z^2)(3)+3(z)(9)-27
\\\\=
z^3-9z^2+27z-27
.\end{array}