Let $V\subset\mathbb{C}[X]$ be the set of polynomials of degree at most $w$ and the pairing $\langle\cdot,\cdot\rangle:V\times V\rightarrow\mathbb{C}$ given by $$ \left\langle\sum a_nX^n,\sum b_nX^n \right\rangle=\sum (-1)^{w-n}\binom{w}{n}^{-1}a_nb_{w-n}.$$ It can be seen that $$\left\langle(aX+b)^w,(cX+d)^w\right\rangle=(ad-bc)^{w}.$$
In the article Modular forms and period polynomials by Pașol and Popa, the authors state that the last relation implies $\langle P|g,Q\rangle=\langle P,Q|g^{-1}\rangle$ for every $g\in SL_2(\mathbb{R})$, where we have an action of $SL_2(\mathbb{R})$ on $V$ given by $$P|g(X)=(cX+d)^wP\left(\frac{aX+b}{cX+d}\right), \quad g=\begin{bmatrix}a&b\\c&d\end{bmatrix}\in SL_2(\mathbb{R}).$$
Can someone tell me how they obtained $\langle P|g,Q\rangle=\langle P,Q|g^{-1}\rangle$? I tried to check $P=X^n$ and $Q=X^m$ (then, by bilinearity, will imply the relation for every pair of polynomials), but the computations are not very simple and I couldn't finish them. There has to be something easier.
Lemma. If $a_0,\dots, a_w$ are distinct complex numbers, then $(X+a_0)^w,\dots,(X+a_w)^w$ are linearly independent.
Proof. Let $x_0,\dots,x_w\in\mathbb{C}$ such that $x_0(X+a_0)^w+\dots+x_w(X+a_w)^w=0$. Expanding the brackets we obtain $$ \sum_n\sum_j \binom{w}{j}x_na_n^jX^{w-j}=0$$ which is equivalent to $$\sum_j\binom{w}{j}\left[\sum_na_n^jx_n\right]X^{w-j}=0.$$ From the last equality we get $$ \begin{bmatrix} 1 & 1 & \cdots & 1 \\ a_0 & a_1 & \cdots & a_w \\ \vdots & \vdots & \ddots & \vdots \\ a_0^w & a_1^w & \cdots & a_w^w \end{bmatrix}\cdot \begin{bmatrix} x_0 \\ x_1 \\ \vdots \\ x_w \end{bmatrix}=0 $$ so $x_0=\dots=x_n=0$, as the system matrix has determinant $\prod_{i<j}(a_j-a_i)\neq 0$. $\Box$
From the above lemma, $V$ is generated by the polynomials of type $(mX+n)^w$, so it's enough to prove $\langle P|g,Q|g\rangle=(\det{g})^w\langle P,Q\rangle$ only for $P=(mX+n)^w$ and $Q=(pX+q)^w$. Note that this statement is stronger, as we alow $g$ to be any invertible matrix.
We will write $(mX+n)^w=[m,n]^\star$. Then, for $g=\begin{bmatrix}a&b\\c&d\end{bmatrix}$, we have $$[m,n]^\star|g= \left(m(aX+b)+n(cX+d)\right)^w=[am+cn,bm+dn]^\star= [(m,n)\cdot g]^\star.$$ Moreover, we note that $$\left\langle[m,n]^\star,[p,q]^\star\right\rangle=\begin{vmatrix}m&n\\p&q\end{vmatrix}^w.$$
Therefore $$\langle P|g,Q|g\rangle= \left\langle[m,n]^\star|g,[p,q]^\star|g\right\rangle= \left\langle\left[(m,n)\cdot g\right]^\star,\left[(p,q)\cdot g\right]^\star\right\rangle= \left(\det{\left(\begin{bmatrix}m&n\\p&q\end{bmatrix}g\right)}\right)^w= (\det{g})^w\begin{vmatrix}m&n\\p&q\end{vmatrix}^w= (\det{g})^w\langle P,Q\rangle.$$
From the last relation, we get $\langle P|g,Q\rangle=\langle P,Q|g^{-1}\rangle$ for $g\in SL_2(\mathbb{R})$, replacing $Q$ with $Q|g^{-1}$.