Why does the modular equation \begin{align} \frac{K'(k)}{K(k)} = n\frac{K'(l)}{K(l)} \tag{1}\label{eq1} \end{align} where $n$ is an integer, imply a relation $y=f(x)$ such that \begin{align} \frac{dx}{\sqrt{(1-x^2)(1-k^2x^2)}} = \frac{M(k,l)dy}{\sqrt{(1-y^2)(1-l^2y^2)}} \tag{2}\label{eq2} \end{align} for some $M(k,l)$? (See https://mathworld.wolfram.com/ModularEquation.html).
To give an idea of what I already know, I know about elliptic functions and integrals, so I know $K$ and $K'$ are complete elliptic integrals. I also know a tiny bit about modular functions and the modular group.