You understand that these are just linear equations, don't you: Ac+ Bd= 2 and A^2c+ B^2d= 5 with [tex]A= 1+ \sqrt{2}[/tex] and [tex]B= 1- \sqrt{2}[/tex]. Yes, you could solve the first equation for c, [tex]c= (2- Bd)/A[/tex], and put that into the second equation: A^2[(2- Bd)/A)+ B^2d= A(2- Bd)+ B^2d= 2A- ABd+B^2d= 5 so (B^2- AB)d= 5- 2A and d= (5- 2A)/(B^2- AB)
Personally, I would have multiplied the first equation by A to get A^2c+ ABd= 2A and then subtract that from the second equation: (B^2- AB)d= 5- 2A which immediately gives d= (5- 2A)/(B^2- AB). Similarly, multiply the first equation by B to get ABc+ B^2d= 2B and subtract that from the second equation to get (A^2- AB)c= 5- 2B so that c= (5- 2B)/(A^2- AB).
Now put [tex]A= 1+\sqrt{2}[/tex] and [tex]B= 1- \sqrt{2}[/tex].