Assuming that $A$ is symmetric , V an arbitary unitary matrice and $B$ positive definite. I need to maximize $Tr[V^T A V]$ subject to a normalization constraint for V , one that requires that $V$ be B-orthogonal (i.e $V^T BV=I)$.
$$ \left\{\begin{array}{cc} \max _{V \in \mathbb{R}^{n \times d}} & \operatorname{Tr}\left[V^{T} A V\right] \\ V^{T} B V=I \end{array}\right. $$
Let $M$ be a square matrix such that $B = M^TM$ ($M$ can be attained, for instance, with a Cholesky decomposition). With the substitution $U = MV$, we can rewrite the maximization problem as $$ \begin{cases} \max_{U \in \Bbb R^{n \times d}}\operatorname{Tr}[U^T[M^{-T}AM^{-1}]U]\\ U^TU = I. \end{cases} $$ Conclude that the maximum is the sum of the $d$ largest eigenvalues of $M^{-T}AM^{-1}$. Note that these are equal to the eigenvalues of $M^{-1}M^{-T}A = B^{-1}A$. In other words, the maximum will be the $d$ largest eigenvalues of $B^{-1}A$.