Leaving the superscript indices, we substitute for L = 2^{-\frac{S+M}{2}} z^{S/2} (2-z)^{M/2} V Doing the necessary differentiation and putting it in our primary differential equation we get, 2^{-(S+M)/2}z^{S/2} (2-z)^{M/2}\left[(2z-z^2)\\\left(V''+ \frac{S}{2}\frac{S-2}{2z^2}V+\frac{M}{2}\frac{M-2}{2(2-z)^2}V-\frac{SM}{2}\frac{1}{z(2-z)}V+\frac{S}{z}V'-\frac{M}{(2-z)}V'\right)\\+ 2(1-z)\left(\frac{S}{2z}V-\frac{M}{2(2-z)}V+V'\right)+\left(\lambda{V} - \frac{\left(m+\frac{n}{2}(2-z)\right)^2}{2z-z^2}V\right)\right]= 0
Rewriting as (by cancelling the common term assuming it is not equal to zero), (2z-z^2)V'' + V' \left[2(1+S)-z(2+S+M)\right]+ [arithmetic \,\,simplification]V = 0
Arithmetic Simplification worked out separately as,
V\left[\frac{S(S-2)}{4}\frac{2-z}{z} +\frac{M(M-2)}{4}\frac{z}{2-z}-\frac{SM}{2}\\+\frac{S(1-z)}{z} - \frac{M(1-z)}{2-z}+\lambda-\frac{\left(m+\frac{n}{2}(2-z)\right)^2}{2z-z^2}\right]V
which becomes (bracket and V is not important), \lambda - \frac{SM}{2} + \\ \left[\frac{S(S-2)(2-z)^2+M(M-2)z^2+4S(1-z)(2-z)-4Mz(1-z)\\- 4m^2 - n^2(2-z)^2-4mn(2-z)}{4(2z-z^2)}\right]
with common terms of numerator and denominator,
\lambda-\frac{SM}{2}+\\\left[\frac{(2-z)\left(2S^2-4S-S^2z+2Sz+4S-4Sz)\right)+\\z\left(M^2z-2Mz-4M+4Mz\right)-4m^2-n^2(2-z)^2-4mn(2-z)}{4(2z-z^2)}\right]
it gives, \lambda-\frac{SM}{2}+\\\left[\frac{(2-z)2z(-S)+(2-z)(2S^2-S^2z)+2z(2-z)(-M)+\\z^2M^2-\left(4m^2+n^2(2-z)^2+4mn(2-z)\right)}{4(2z-z^2)}\right]
which gets more simplified by the substitution, M^2 = |m|^2\\ S^2 = |m+n|^2 as,
\lambda -\frac{SM}{2}-\frac{S}{2}-\frac{M}{2}+\\\left[\frac{\left(-2S^2z(2-z)+S^2z(2-z)+2S^2(2-z)+\\z^2M^2-4m^2-4n^2-n^2z^2+4zn^2-8mn+4mnz\right)}{4(2z-z^2)}\right]
and \lambda - \frac{\left(S^2+S+M+SM\right)}{2}+\\\left[\frac{2S^2z-S^2z^2-2S^2z+4S^2+z^2M^2-4m^2-4n^2-n^2z^2+4zn^2-8mn+4mnz}{4(2z-z^2)}\right]
\lambda - \frac{\left(S^2+S+M+SM\right)}{2}+\\\left[\frac{-S^2z^2+4n^2+4m^2\pm8mn+z^2m^2-4m^2-4n^2-8mn-n^2z^2+4n^2z+4mnz}{4(2z-z^2)}\right]
gives, \lambda-\frac{\left(S^2+S+M+SM\right)}{2}+\\\left[\frac{-m^2z^2-n^2z^2+z^2m^2-n^2z^2+4n^2z+4mnz\mp2mnz^2\pm8mn-8mn}{4(2z-z^2)}\right]
It gives, \lambda-\frac{\left(S^2+S+M+SM\right)}{2} +\left[\frac{4mnz\mp2mnz^2+2n^2(2z-z^2)\pm8mn-8mn}{4(2z-z^2)}\right]$\rightarrow$\lambda - \frac{\left(S+M+SM\right)}{2}+\\ \left[\frac{-S^24z+2S^2z^2+4mnz\mp2mnz^2+4n^2z-2n^2z^2\pm8mn-8mn}{4(2z-z^2)}\\ \leftrightarrow\frac{2m^2z^2+2n^2z^2\pm4mnz^2-4m^2z-4n^2z\mp8mnz+\\4mnz\mp2mnz^2+4n^2z-2n^2z^2\pm8mn-8mn}{4(2z-z^2)}\right]\lambda-\frac{\left(S+M+SM\right)}{2}+\left[\frac{2m^2z^2-4m^2z+4mnz-8mn\pm4mnz^2\mp8mnz\mp2mnz^2\pm8mn}{4(2z-z^2)}\\\leftrightarrow\frac{-2m^2(2z-z^2)+4mnz\mp8mnz-8mn\pm8mn\pm4mnz^2\mp2mnz^2}{4(2z-z^2)}\right]Using the fact $m^2=M^2$ and assuming m and n are positive i.e.$|m+n|^2 = (m+n)^2 = m^2 +n^2 +2mn$ and not "-2mn", then we have,
\lambda-\frac{\left(S+M+SM\right)}{2}+\\\left[\frac{-2M^2(2z-z^2)+2mn(z^2-2z)}{4(2z-z^2)}\right]
which gives our final equation as, (2z-z^2)V''+\left[2(1+s)-z(S+M+2)\right]V'+ \left[\lambda- \frac{\left((S+M)(1+M)+nm\right)}{2}\right]V=0
You can reduce some two to three steps without bringing out $S^2$ term
Now, we need to proceed with this differential equation again using power series method for the final solution.
Rewriting as (by cancelling the common term assuming it is not equal to zero), (2z-z^2)V'' + V' \left[2(1+S)-z(2+S+M)\right]+ [arithmetic \,\,simplification]V = 0
Arithmetic Simplification worked out separately as,
V\left[\frac{S(S-2)}{4}\frac{2-z}{z} +\frac{M(M-2)}{4}\frac{z}{2-z}-\frac{SM}{2}\\+\frac{S(1-z)}{z} - \frac{M(1-z)}{2-z}+\lambda-\frac{\left(m+\frac{n}{2}(2-z)\right)^2}{2z-z^2}\right]V
which becomes (bracket and V is not important), \lambda - \frac{SM}{2} + \\ \left[\frac{S(S-2)(2-z)^2+M(M-2)z^2+4S(1-z)(2-z)-4Mz(1-z)\\- 4m^2 - n^2(2-z)^2-4mn(2-z)}{4(2z-z^2)}\right]
with common terms of numerator and denominator,
\lambda-\frac{SM}{2}+\\\left[\frac{(2-z)\left(2S^2-4S-S^2z+2Sz+4S-4Sz)\right)+\\z\left(M^2z-2Mz-4M+4Mz\right)-4m^2-n^2(2-z)^2-4mn(2-z)}{4(2z-z^2)}\right]
it gives, \lambda-\frac{SM}{2}+\\\left[\frac{(2-z)2z(-S)+(2-z)(2S^2-S^2z)+2z(2-z)(-M)+\\z^2M^2-\left(4m^2+n^2(2-z)^2+4mn(2-z)\right)}{4(2z-z^2)}\right]
which gets more simplified by the substitution, M^2 = |m|^2\\ S^2 = |m+n|^2 as,
\lambda -\frac{SM}{2}-\frac{S}{2}-\frac{M}{2}+\\\left[\frac{\left(-2S^2z(2-z)+S^2z(2-z)+2S^2(2-z)+\\z^2M^2-4m^2-4n^2-n^2z^2+4zn^2-8mn+4mnz\right)}{4(2z-z^2)}\right]
and \lambda - \frac{\left(S^2+S+M+SM\right)}{2}+\\\left[\frac{2S^2z-S^2z^2-2S^2z+4S^2+z^2M^2-4m^2-4n^2-n^2z^2+4zn^2-8mn+4mnz}{4(2z-z^2)}\right]
\lambda - \frac{\left(S^2+S+M+SM\right)}{2}+\\\left[\frac{-S^2z^2+4n^2+4m^2\pm8mn+z^2m^2-4m^2-4n^2-8mn-n^2z^2+4n^2z+4mnz}{4(2z-z^2)}\right]
gives, \lambda-\frac{\left(S^2+S+M+SM\right)}{2}+\\\left[\frac{-m^2z^2-n^2z^2+z^2m^2-n^2z^2+4n^2z+4mnz\mp2mnz^2\pm8mn-8mn}{4(2z-z^2)}\right]
It gives, \lambda-\frac{\left(S^2+S+M+SM\right)}{2} +\left[\frac{4mnz\mp2mnz^2+2n^2(2z-z^2)\pm8mn-8mn}{4(2z-z^2)}\right]$\rightarrow$\lambda - \frac{\left(S+M+SM\right)}{2}+\\ \left[\frac{-S^24z+2S^2z^2+4mnz\mp2mnz^2+4n^2z-2n^2z^2\pm8mn-8mn}{4(2z-z^2)}\\ \leftrightarrow\frac{2m^2z^2+2n^2z^2\pm4mnz^2-4m^2z-4n^2z\mp8mnz+\\4mnz\mp2mnz^2+4n^2z-2n^2z^2\pm8mn-8mn}{4(2z-z^2)}\right]\lambda-\frac{\left(S+M+SM\right)}{2}+\left[\frac{2m^2z^2-4m^2z+4mnz-8mn\pm4mnz^2\mp8mnz\mp2mnz^2\pm8mn}{4(2z-z^2)}\\\leftrightarrow\frac{-2m^2(2z-z^2)+4mnz\mp8mnz-8mn\pm8mn\pm4mnz^2\mp2mnz^2}{4(2z-z^2)}\right]Using the fact $m^2=M^2$ and assuming m and n are positive i.e.$|m+n|^2 = (m+n)^2 = m^2 +n^2 +2mn$ and not "-2mn", then we have,
\lambda-\frac{\left(S+M+SM\right)}{2}+\\\left[\frac{-2M^2(2z-z^2)+2mn(z^2-2z)}{4(2z-z^2)}\right]
which gives our final equation as, (2z-z^2)V''+\left[2(1+s)-z(S+M+2)\right]V'+ \left[\lambda- \frac{\left((S+M)(1+M)+nm\right)}{2}\right]V=0
You can reduce some two to three steps without bringing out $S^2$ term
Now, we need to proceed with this differential equation again using power series method for the final solution.