Answer
$z^3-9z^2+27z-27$
Work Step by Step
Using $(a+b)^3=a^3+3a^2b+3ab^2+b^3$ or the cube of a binomial, the given 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+3z^2(-3)+3z(9)+(-27)
\\\\=
z^3-9z^2+27z-27
.\end{array}