Find the value of $x+y$ if $x^2+y^2+10 = 2\sqrt2x+4\sqrt2y$ 
If $$x^2+y^2+10 = 2\sqrt{2}x+4\sqrt{2}y$$ then the value of $(x+y)$ is:
a) $4\sqrt{2}$
b) $3\sqrt{2}$
c) $6\sqrt{2}$
d) $9\sqrt{2}$

Please teach me its basics and how to solve it?

HINT:
We have $$x^2-2\cdot x\cdot \sqrt2 +(\sqrt2)^2+y^2-2\cdot y\cdot 2\sqrt2+(2\sqrt2)^2=10-2-8$$
 $$\implies(x-\sqrt2)^2+(y-2\sqrt2)^2=0$$
We know, if $z$ is real , $z^2\ge 0$
