How can we prove that $ \int f(y) \frac{dy}{dx} \, dx = \int f(y) \, dy $?

This is just integration by substitution. Note for $$ \int f(y)y' dx $$ we can set ${u = y(x)}$ to obtain $$ \rightarrow \int f(u)du $$ but ${u=y}$, so $$ \rightarrow \int f(y)dy $$