I understand that $\displaystyle c^2 = a^2+b^2$

Now I have this problem, find the missing a,b or c length.

$\displaystyle a=\sqrt{2}, b=\sqrt{2}$

So I say that $\displaystyle a^2=4, b^2=4, c^2=8$

or am I doing it wrong?

If not then I get confused on this next question.

$\displaystyle a=\sqrt{8}, c=3$

$\displaystyle a^2=64, c^2=9$ but how can $\displaystyle c^2 = a^2+b^2$ in this question?