For the last 2 terms, you can just replace z^2 by 1 and calculate its value, so that is done.
For the first 2 terms, you want to rewrite it like this: z+1z=z2z+1z=z2+1z
Rewriting and substituting z^2 = 1 gives 1+1z+1+11=2+2z. This indicates the answer still depends on z.
Note that there are exactly 2 complex numbers satisfying z^2 = 1. (Hint: Move the 1 to the left-hand side and try to factorize.)
Depending on which one you consider, the required value will be different.
The answer Guest gave is not entirely correct due to this reason.