In our algebra class, our teacher often does the following:
$a + b\sqrt{2} = 5 + 3\sqrt{2} \implies \;\text{(by inspection)}\; a=5, b = 3 $
I asked her why we can make this statement. She was unable to provide a satisfactory answer. So I tried proving it myself.
$a + b\sqrt{2} = x + y\sqrt{2}$. We are required to prove that $a = x$, and $b = y$. Manipulating the equation, we get $\sqrt{2}(b - y) = x - a$, or $\sqrt{2} = \frac{x-a}{b-y}$. Expanding this, we get $\sqrt{2} = \frac{x}{b-y} + \frac{a}{b-y}$. I tried various other transformations, but nothing seemed to yield a result.