The second example
The following transforms any ode of the form $y'= (a x + b y + c)^{\frac{n}{m}}$ into separable ode $u'=a+b u^{\frac{n}{m}}$

Currently, this aborts if unable to do the transformation. Future version can be made more user friendly :)
Code
match[rhs_, y_Symbol, x_Symbol, u_Symbol] := Module[{a, b, c, n, e}, If[Not[MatchQ[rhs, e_.*(a_.*x + b_.*y + c_.)^n_]], Abort[]]; {e, a, b, c, n} = rhs /. e_.*(a_.*x + b_.*y + c_.)^n_ :> {e, a, b, c, n}; D[u[x], x] == e*(b*u[x]^n + a) ] makeSeparable[ode_Equal, y_[x_], u_[x_]] := Module[{rhs}, rhs = SolveValues[ode, D[y[x], x]]; If[Length[rhs] == 0, Abort[]]; rhs = Simplify[rhs]; rhs = rhs /. y[x] -> y; Map[match[#, y, x, u] &, rhs] ]
Test
testCases = {y'[x] == (a*x + b*y[x] + c)^(n/m), y'[x] == (x + y[x])^2, x == y[x] - y'[x]^3, y'[x]^2 == x - y[x], y'[x]^3 + x - y[x] == 0, y'[x] == (x + y[x] + 3)^2, y'[x] == (x + y[x] + 99)^(3/2), y'[x] == (5*x + 9*y[x])^5} Grid[{#, makeSeparable[#, y[x], u[x]]} & /@ testCases, Frame -> All]
The first example
This is called homogeneous ode of class C and can be transformed to separable also using general algorithm if it is possible to find the mapping X,Y.
The following transforms $y'= \frac{a_0 x + b_0 y + c_0}{a_1 x + b_1 y + c_1} $ to separable. Little error checking is done.

Code
findTransformation[ode_Equal, y_Symbol, x_Symbol, fx_, fy_, u_Symbol, X_Symbol, Y_Symbol] := Module[{x0, y0, e, newODE, rhs, eq, sol}, newODE = DSolveChangeVariables[Inactive[DSolve] [ode, y[x], x], Y[X], X, {x == X + x0, y[x] == Y[X] + y0}]; newODE = newODE[[1]]; rhs = SolveValues[newODE, D[Y[X], X]]; If[Length[rhs] > 1, Abort[], rhs = Normal@First@rhs]; rhs = Normal[rhs /. Y[X] -> Y]; eq = 1 == -(X*D[rhs, X])/(Y*D[rhs, Y]); sol = SolveAlways[eq, {X, Y}]; (*solve for x0,y0*) newODE = newODE /. sol; newODE = DSolveChangeVariables[Inactive[DSolve] [newODE, Y[X], X], u[X], X, Y[X] == u[X]*X]; Solve[newODE[[1]], u'[X]] ] homogCToSep[ode_Equal, y_, x_, u_, X_, Y_] := Module[{e, rhs, z, fx, fy}, e = Map[Not@FreeQ[ode, #] &, {Abs, Piecewise}]; If[AnyTrue[e, # == True &], Abort[]]; rhs = SolveValues[ode, D[y[x], x]]; If[Length[rhs] > 1, Abort[], rhs = Normal@First@rhs]; rhs = Normal[rhs /. y[x] -> y]; fx = Normal[D[rhs, x]]; If[fx == 0, Abort[]]; fy = Normal[D[rhs, y]]; If[fy == 0, Abort[]]; findTransformation[ode, y, x, fx, fy, u, X, Y] ]
Test
testCases = {y'[x] == (x - y[x] + 1)/(x + y[x] - 3), x^2*y'[x] == (1 + 2*x - y[x])^2, (x - a)^2*y'[x] + k*(x + y[x] - a)^2 + y[x]^2 == 0, (1 + y[x])*y'[x] == x + y[x], (1 + x + y[x])*y'[x] + 1 + 4*x + 3*y[x] == 0, y'[x] == (1 + x - 3*y[x])/(3 - x - y[x]), y'[x] == (11 - 4*x + 3*y[x])/(3 - x + y[x]), y'[x] == (-5 - x + 2*y[x])/(4 + 2*x - y[x]), (1 - 3*x + y[x])* y'[x] == 2*x - 2*y[x], (a + b + x + y[x])^2*y'[x] == 2*(a + y[x])^2, (1 - 3*x - y[x])^2* y'[x] == (1 - 2*y[x])*(3 - 6*x - 4*y[x])} Grid[{#, homogCToSep[#, y, x, u, X, Y]} & /@ testCases, Frame -> All]
how can I output the expressions for u, X, and Y
This version returns the $X,Y$ mapping found, To obtain $u$, the newODE needs to be solved. Here is modified version of the above for the First example which now returns the $u$ ode in form that can be solve by DSolve and also returns X,Y
Version 8/17/2024
To answer comment
how can I output the expressions for u, X, and Y
findTransformation[ode_Equal,y_Symbol,x_Symbol,fx_,fy_,u_Symbol,X_Symbol,Y_Symbol]:=Module[{x0,y0,e,newODE,rhs,eq,sol},newODE=DSolveChangeVariables[Inactive[DSolve][ode,y[x],x],Y[X],X,{x==X+x0,y[x]==Y[X]+y0}]; newODE=newODE[[1]]; rhs=SolveValues[newODE,D[Y[X],X]]; If[Length[rhs]>1,Abort[],rhs=Normal@First@rhs]; rhs=Normal[rhs/. Y[X]->Y]; eq=1==-(X*D[rhs,X])/(Y*D[rhs,Y]); sol=SolveAlways[eq,{X,Y}];(*solve for x0,y0*) newODE=newODE/. sol; newODE=DSolveChangeVariables[Inactive[DSolve][newODE,Y[X],X],u[X],X,Y[X]==u[X]*X]; {First@newODE[[1]],{x==X+x0,y[x]==Y[X]+y0}/.sol} ]
To use do
ode = y'[x] == (x - y[x] + 1)/(x + y[x] - 3); {newODE, transformation} = homogCToSep[ode, y, x, u, X, Y]

To find $u$ then do
DSolve[newODE, u[X], X]

To find $y(x)$ which is the solution to original ode, we just need to reverse the transformation done, which is just algebraic operation now. This is not shown since question asked just to convert the ode to separable but this is easy to do if you want to add it to your own code.
See Y[X] == u[X]*X for the relation. Then knowing $X,Y$ we now find $y(x)$ given $u$.
DSolveprobably does it sometimes, although it might choose a different solution method in other cases. $\endgroup$DSolve`DSolveFirstOrderODEDump`SeparateVariables[(1 + x - y)/(-3 + x + y), x, y]returns failed, butDSolve`DSolveFirstOrderODEDump`SeparateVariables[(1 + x - y)/(-3 + x + y) /. {x -> (x + y)/Sqrt[2], y -> (x - y)/Sqrt[2]}, x, y]succeeds. $\endgroup$