Q. Factorise the following:

$\displaystyle z^3 - 7z - z^2 + 7$

had a look at the answer and is $\displaystyle (z - 1)(z^2 - 7)$

i tried the group in pairs method but i didn't get the answer, and now i have no idea on how to work it out.

if anyone can show me the full working out that would be a great help, thanks