In a memory protocol of a past machine learning exam, I found the following task
Consider $\max_{w \in \mathbb R^d, v \in \mathbb R^n} w^T A w + v^T B v$ subject to $\| v \|^2 + \| w \|^2 = 1$, where $A$ and $B$ are positive definite matrices of respective forms ($d \times d$, $n \times n$). Write the Lagrange function associated with this constraint problem and derive the solution $\begin{bmatrix} w^* \\ v^* \end{bmatrix}$ of this constraint problem.
Here is what I have done: The Lagrangian is $$ L(v, w, \lambda) := w^T A w + v^T B v + \lambda (1 - \| v \|^2 - \| w \|^2), $$ whose partial derivatives I set to zero: $$ \frac{\partial L(v, w, \lambda)}{\partial v} = 2 B v - 2 \lambda v \overset{!}{=} 0 \iff B v = \lambda v $$ and analogously $\frac{\partial L(v, w, \lambda)}{\partial w} = 0 \iff A w = \lambda w$.
In my quest to find $\lambda$, I multiplied those two equations with $v^T$ and $w^T$, respectively, and added them to each other to obtain $$ v^T B v + w^T A w = \lambda (v^T v + w^T w) = \lambda. $$ As $A$ and $B$ are positive definite, we must have $\lambda > 0$.
How do I continue from here to find $\begin{bmatrix} w^* \\ v^* \end{bmatrix}$?