For a symmetric positive semi-definite matrix $A = Q\Lambda Q^T \in \mathbb{R}^{n\times n}$ and $\lambda_1 \geq \lambda_2 ....\geq \lambda_n$ find $$ \max \ (x^TAx+y^TAy) \ \ \text{s.t} \ x^Tx = y^Ty = 1, x^Ty = 0 $$ and corresponding $x, y$.
My approach was to define $a = Q^Tx$ and $ b=Q^Ty$. $$ \max \ (x^TAx+y^TAy) =\max \ (a^T\Lambda a+b^T\Lambda b)\\ =\max (\sum_{i=1}^{n}\lambda_ia_i^2+\sum_{i=1}^{n}\lambda_ib_i^2) $$ Clearly, $\sum_{i=1}^{n}\lambda_ia_i^2$ is maximized when $a=e_1$. Since $a^Tb=x^Ty=0$ the same maximization $b=e_1$ is impossible as $b^Ta=b^Te_1 = e_1^Te_1\neq 0$. The next possible maximum for $\sum_{i=1}^{n}\lambda_ib_i^2$ is $b=e_2$.
Therefore, $$ x = Qe_1 = q_1 \\ y = Qe_2 = q_2 \\ \max \ (x^TAx+y^TAy) = \lambda_1+\lambda_2 $$
This is my intuition for what should be the solution, but I can't think of a way to definitely show that $x=q_1$, $y=q_2$ maximizes $x^TAx+y^TAy$. How can I show that $x=q_1$, $y=q_2$ is the optimal solution?