I have the following proof for the Work-Energy theorem (with the usual notation).
Where I'm getting lost is basically at the line break, clearly just missing something very obvious. How is it that we can say that
$$ m \int^{x_2}_{x_1} \frac{dv}{dt} dx = m \int^{v_2}_{v_1} \frac{dx}{dt} dv $$
There is clearly a change of variables happening but I can't figure it out. Any ideas?
Alternatively, if you have a link to a source that goes into this proof in more detail that'll probably cover it so please leave it in the comments!
Thanks.

I think I found a good explanation for my specific issue with this step in the reply by user Brick to this question on Physics SE.
We start off with the Chain Rule, $$ \frac{dy}{dt}= \frac{dy}{dx} \frac{dx}{dt}, \text{ for } y=y(x(t)). $$
In our case, $v(x(t))=y(x(t))$. So we have
\begin{align} \text{LHS } &= m \int_{x_1}^{x_2} \frac{dv}{dt} dx \\ & = m \int_{x_1}^{x_2} \frac{dv}{dx}\frac{dx}{dt} dx \\ \end{align}
for clarity, I'm going to treat this as a change of variables with $u$, but you could just "cancel" the $dx$ at this point.
Let $$ u = \frac{dx}{dt} \left( = v \right). $$
Then, $$ \frac{du}{dx} = \frac{d}{dx} \frac{dx}{dt}, \text{ so } du = \frac{dv}{dx} dx. $$
Additionally, for the boundaries, \begin{align} \text{when } x &= x_1, ~u = \frac{dx}{dt}(x_1) = v(x_1) = v_1, \\ x &= x_2, ~u = v(x_2) = v_2. \end{align}
Now it's easy to apply this change of variables:
\begin{align} m \int_{x_1}^{x_2} \frac{dv}{dx}\frac{dx}{dt} dx &= m \int_{v_1}^{v_2} \frac{dx}{dt} dv \\ &= \text{ RHS}. \end{align}