\[ y'(x)-(A y(x)-a) (B y(x)-b)=0 \] ✓ Mathematica : cpu = 0.293557 (sec), leaf count = 56
\[\left \{\left \{y(x)\to \frac {a e^{A b \left (c_1+x\right )}-b e^{a B \left (c_1+x\right )}}{A e^{A b \left (c_1+x\right )}-B e^{a B \left (c_1+x\right )}}\right \}\right \}\]
✓ Maple : cpu = 0.1 (sec), leaf count = 45
\[ \left \{ y \left ( x \right ) ={\frac {{{\rm e}^{ \left ( x+{\it \_C1} \right ) \left ( Ab-aB \right ) }}a-b}{A{{\rm e}^{ \left ( x+{\it \_C1} \right ) \left ( Ab-aB \right ) }}-B}} \right \} \]
\begin {align} y^{\prime }-\left ( Ay-a\right ) \left ( By-b\right ) & =0\nonumber \\ y^{\prime } & =\left ( Ay-a\right ) \left ( By-b\right ) \nonumber \\ & =ab-y\left ( Ab+Ba\right ) +ABy^{2}\tag {1} \end {align}
This is Riccati first order non-linear ODE with \(P\left ( x\right ) =ab,Q\left ( x\right ) =-\left ( Ab+Ba\right ) ,R\left ( x\right ) =AB\). Let \(y=-\frac {u^{\prime }}{uR\left ( x\right ) }=-\frac {u^{\prime }}{ABu}\), hence
\[ y^{\prime }=\frac {-u^{\prime \prime }}{ABu}-\frac {\left ( u^{\prime }\right ) ^{2}}{ABu^{2}}\]
Comparing to (1) results in
\begin {align*} \frac {-u^{\prime \prime }}{ABu}-\frac {\left ( u^{\prime }\right ) ^{2}}{ABu^{2}} & =ab-y\left ( Ab+Ba\right ) +ABy^{2}\\ & =ab-\left ( -\frac {u^{\prime }}{ABu}\right ) \left ( Ab+Ba\right ) +AB\left ( -\frac {u^{\prime }}{ABu}\right ) ^{2}\\ & =ab+\frac {u^{\prime }}{ABu}\left ( Ab+Ba\right ) +AB\frac {\left ( u^{\prime }\right ) ^{2}}{\left ( ABu\right ) ^{2}}\\ & =ab+\frac {u^{\prime }}{ABu}\left ( Ab+Ba\right ) +\frac {\left ( u^{\prime }\right ) ^{2}}{ABu^{2}} \end {align*}
Hence
\begin {align*} \frac {-u^{\prime \prime }}{ABu} & =ab+\frac {u^{\prime }}{ABu}\left ( Ab+Ba\right ) \\ -u^{\prime \prime } & =ABabu+u^{\prime }\left ( Ab+Ba\right ) \\ u^{\prime \prime }+u^{\prime }\left ( Ab+Ba\right ) +u\left ( ABab\right ) & =0 \end {align*}
This is second order ODE with constant coefficient. Solution is
\[ u=c_{1}e^{-aBx}+c_{2}e^{-Abx}\]
Therefore
\[ u^{\prime }=-aBc_{1}e^{-aBx}-c_{2}Abe^{-Abx}\]
And therefore the solution is
\begin {align*} y & =-\frac {u^{\prime }}{ABu}=-\frac {1}{AB}\frac {-aBc_{1}e^{-aBx}-c_{2}Abe^{-Abx}}{c_{1}e^{-aBx}+c_{2}e^{-Abx}}\\ & =\frac {aBc_{1}e^{-aBx}+c_{2}Abe^{-Abx}}{AB\left ( c_{1}e^{-aBx}+c_{2}e^{-Abx}\right ) } \end {align*}
Dividing by \(c_{2}\) and letting \(c=\frac {c_{1}}{c_{2}}\)
\[ y=\frac {aBce^{-aBx}+Abe^{-Abx}}{AB\left ( ce^{-aBx}+e^{-Abx}\right ) }\]
Verification
eq:=diff(y(x),x)-(A*y(x)-a)*(B*y(x)-b) = 0; sol:=(a*B*_C1*exp(-a*B*x)+A*b*exp(-A*b*x))/(A*B*(_C1*exp(-a*B*x)+exp(-A*b*x))); odetest(y(x)=sol,eq); 0