I know that ${\langle x, y \rangle}$ means the inner product but I've stumbled upon the notation ${\langle x, y \rangle}_a$ with $a \in \mathbb{R}$ and I can't figure out what it means. Usually what's in the subscript isn't a number, but the denotion of some vector space, e.g. $V$.
The context is this problem from an exam in the introductory course in linear algebra at our university:
Let ${\langle,\rangle}_1$ and ${\langle,\rangle}_2$ be two inner product structures on a finite-dimensional vector space $V$. Show that there is a linear map $T: V \to V$ such that
${\langle x,y \rangle}_1$ = ${\langle T(x), y \rangle}_2$
for all $x$ and $y$ in $V$.
In your context the notation $\langle f,g \rangle_1$ or $\langle f,g \rangle_2$ is just a way to name two distinct inner products, this is all. The numbers doesn't have a "mathematical" meaning, it just a name, a tag.
We could say also that there are two inner products, represented as $\langle f,g\rangle_{\text{ foo }}$ and $\langle f,g \rangle_{\text{ bar }}$ to distinguish them.