I am given the following exercise and I am not sure I understand what it asks:
Find the extrema for $z=2x^2-y^2$, given $x+y=2$.
This part "given $x+y=2$" is confusing. I know that if any point is extremum, then partial derivatives should be zero. In this case: $$\begin{align} \partial_x z &= 4x\\ \partial_y z &= -2y \end{align}$$
This gives $x = 0$ and $y = 0$. So, what is the point of the condition given?
The purpose of given constraint is to scope down the range of $(x,y)$. In your case, instead of finding an optimum in $\mathbb{R}^2$, you should find an optimum of $z$ along the line $x + y = 2$.
Normally, I would not do any partial derivative to this problem. We know that $x + y = 2$, hence the problem can be simplified as
$$z = 2x^2 - (2 - x)^2$$