Showing that $\mathrm{Var}(X)=\mathrm{Var}(Y)$ Let $X$ and $Y$ be continuous random variables with the following PDF $(b>a)$:

Show that $\mathrm{Var}(X)=\mathrm{Var}(Y)$.
Here is my attempt:
\begin{align*}
\mathrm{Var}(X)&=\mathbb{E}(X^2)-(\mathbb{E}(X))^2 = \int_1^2 bx^2 \, dx + \int_2^4 ax^2 \, dx - \left(\int_1^2 bx \, dx + \int_2^4 ax \, dx\right)^2\\
&=\frac{7b+56a}{3}-\frac{9b^2}{4}-18ba-36a^2\\
\mathrm{Var}(Y)&=\mathbb{E}(Y^2)-(\mathbb{E}(Y))^2 = \int_2^4 ay^2\, dy - \int_4^5 by^2\, dy - \left(\int_2^4 ay\, dy - \int_4^5 by\, dy\right)^2\\
&=\frac{56a-61b}{3}-36a^2+54ab-\frac{81b^2}{4}
\end{align*}

These are not necessarily pdfs since the integral under those curves does not necessarily evaluate to one, but $b+2a$, which could be anything!!!
However these could be two probability spaces $\Omega=[1,4]$ and $\Omega'=[2,5]$. The probability measure on both is given by $\frac 13 \mathcal{L}$ (the Lebesgue measure divided by $3$). There are random variables $X$ defined on $\Omega$ and $Y$ on $\Omega'$. There is a mapping $f:\Omega\rightarrow \Omega', s\mapsto 6-s$ that takes both $\Omega$ to $\Omega'$ and $X$ to $Y$ in the sense: $X = Y \circ f$. Denote the pdf of $X$ by $\psi_X$ and the pdf of $Y$ by $\psi_Y$. By the same token $\psi_X=\psi_Y\circ f\cdot f'$.
Now we can write
$$\mathbb{E}[Y^k]=\int_2^5 Y(s)^k \psi_Y(s)\mathrm{d}y.$$
Now substitute $t=6-s$ and we have
$$=\int_4^1 Y(6-t)^k \underbrace{\psi_Y(6-t) (6-t)'}_{\psi_X(t)}\mathrm{d}t = \int_1^4 X(t)^k \psi_X(t)\mathrm{d}t=\mathbb{E}[X^k].$$
