\[ y''(x)=-\frac {\left (a x^2+a-2\right ) y'(x)}{x \left (x^2-1\right )}-\frac {b y(x)}{x^2} \] ✓ Mathematica : cpu = 0.51673 (sec), leaf count = 236
DSolve[Derivative[2][y][x] == -((b*y[x])/x^2) - ((-2 + a + a*x^2)*Derivative[1][y][x])/(x*(-1 + x^2)),y[x],x]
\[\left \{\left \{y(x)\to c_1 (-1)^{\frac {1}{4} \left (-\sqrt {a^2-2 a-4 b+1}+a-1\right )} x^{\frac {1}{2} \left (-\sqrt {a^2-2 a-4 b+1}+a-1\right )} \, _2F_1\left (\frac {a}{2}-\frac {1}{2},\frac {a}{2}-\frac {1}{2} \sqrt {a^2-2 a-4 b+1}-\frac {1}{2};1-\frac {1}{2} \sqrt {a^2-2 a-4 b+1};x^2\right )+c_2 (-1)^{\frac {1}{4} \left (\sqrt {a^2-2 a-4 b+1}+a-1\right )} x^{\frac {1}{2} \left (\sqrt {a^2-2 a-4 b+1}+a-1\right )} \, _2F_1\left (\frac {a}{2}-\frac {1}{2},\frac {a}{2}+\frac {1}{2} \sqrt {a^2-2 a-4 b+1}-\frac {1}{2};\frac {1}{2} \sqrt {a^2-2 a-4 b+1}+1;x^2\right )\right \}\right \}\] ✓ Maple : cpu = 0.11 (sec), leaf count = 161
dsolve(diff(diff(y(x),x),x) = -1/x*(a*x^2+a-2)/(x^2-1)*diff(y(x),x)-b/x^2*y(x),y(x))
\[y \left (x \right ) = \left (x^{2}-1\right )^{-a +2} \left (x^{\frac {a}{2}-\frac {1}{2}-\frac {\sqrt {a^{2}-2 a -4 b +1}}{2}} \hypergeom \left (\left [-\frac {a}{2}+\frac {3}{2}, -\frac {a}{2}+\frac {3}{2}-\frac {\sqrt {a^{2}-2 a -4 b +1}}{2}\right ], \left [1-\frac {\sqrt {a^{2}-2 a -4 b +1}}{2}\right ], x^{2}\right ) c_{2}+\hypergeom \left (\left [-\frac {a}{2}+\frac {3}{2}, -\frac {a}{2}+\frac {3}{2}+\frac {\sqrt {a^{2}-2 a -4 b +1}}{2}\right ], \left [1+\frac {\sqrt {a^{2}-2 a -4 b +1}}{2}\right ], x^{2}\right ) x^{\frac {a}{2}-\frac {1}{2}+\frac {\sqrt {a^{2}-2 a -4 b +1}}{2}} c_{1}\right )\]