I would like to understand the proof of proposition $1.5$ from the book "Representation theory: a first course" of Fulton and Harris.
$\textbf{Proposition}$: If $W$ is a subrepresentation of a representation $V$ of a finite group $G$, then there is a complementary invariant subspace $W'$ of $V$, so that $V = W \oplus W'$.
$\textit{Proof:}\;$ You can introduce a Hermitian inner product $H$ on $V$ which is preserved by each $g \in G$. Indeed, if $H_0$ is any Hermitian product on $V$, one gets such an $H$ by averaging over $G$: $$ \bbox[yellow]{\;H(v,w) = \sum_{g \in G}^{} H_0(gv, gw).\;} $$
Then the perpendicular subspace $W^{\perp}$ is complementary to $W$ in $V$.
I don't understand why the highlighted equation is true and how this proves that the perpendicular subspace $W^{\perp}$ is complementary to $W$ in $V$.