At the ond of this file there is fSubOfLog function which make all steps automaticly

Dara’s Functions from existing modules

nIntegers[l_,n_]:=Module[{list,c={"",""}},

list=l;

While[Length[ DeleteDuplicates[c]]< Length[c],c=Table[qRandList[list],{i,1, n}]];

ToString/@c

];

noRepeats[a_,list_,n_]:=Module[{m,l},m=0;
While[m!=n,m=Length[l=DeleteDuplicates[Join[{a},RandomSample[list,n]]]]];
l];
qRandList[list0_]:=list0[[RandomInteger[{1, Length[list0]}]]];

Random coeficients to equation

{a,b,c,d,e,f}= nIntegers[Flatten[List[Range[-10,-1],Range[1,10]]],6]
While[ ToExpression[d]+ToExpression[e]== 0 , 
Print["in"];
{a,b,c,d,e,f}= nIntegers[Flatten[List[Range[-10,-1],Range[1,10]]],6]]
{a,b,c,d,e,f}

Play with log 1

aS=(x+a)(x+b)/((x+f)(x+c))
aL=(x+a)(x+b)

aL1=If[(ToExpression[a]+ToExpression[b])==0,

"(x^2)"<>If[(ToExpression[a]*ToExpression[b])<0," - "<>ToString[Abs[(ToExpression[a]*ToExpression[b])]]," + "<>ToString[(ToExpression[a]*ToExpression[b])]]
,

"(x^2)"<>
If[(ToExpression[a]+ToExpression[b])<0,
If[(ToExpression[a]+ToExpression[b])==-1," - "," - "<>ToString[Abs[(ToExpression[a]+ToExpression[b])]]]
,
If[(ToExpression[a]+ToExpression[b])==1," + "," + "<>ToString[(ToExpression[a]+ToExpression[b])]]
]<>"x "<>
If[(ToExpression[a]*ToExpression[b])<0," - "<>ToString[Abs[(ToExpression[a]*ToExpression[b])]]," + "<>ToString[(ToExpression[a]*ToExpression[b])]]
]


aL2=If[(ToExpression[f]+ToExpression[c])==0,
"(x^2)"<>If[(ToExpression[f]*ToExpression[c])<0," - "<>ToString[Abs[(ToExpression[f]*ToExpression[c])]]," + "<>ToString[(ToExpression[f]*ToExpression[c])]]
,

"(x^2)"<>
If[(ToExpression[f]+ToExpression[c])<0,
If[(ToExpression[f]+ToExpression[c])==-1," - "," - "<>ToString[Abs[(ToExpression[f]+ToExpression[c])]]]
,
If[(ToExpression[f]+ToExpression[c])==1," + "," + "<>ToString[(ToExpression[f]+ToExpression[c])]]
]<>"x "<>
If[(ToExpression[f]*ToExpression[c])<0," - "<>ToString[Abs[(ToExpression[f]*ToExpression[c])]]," + "<>ToString[(ToExpression[f]*ToExpression[c])]]
]

Play with log 2

bS=(x+d)(x+e)/((x+f))
(*ibs is inverse bs*)
ibS=((x+f))/((x+d)(x+e))
lastLS=ToString[(x+a)(x+b)/((x+c)(x+d)(x+e)),TraditionalForm]

bL1="(x^2)"<>
If[(ToExpression[d]+ToExpression[e])<0,
If[(ToExpression[d]+ToExpression[e])==-1," - "," - "<>ToString[Abs[(ToExpression[d]+ToExpression[e])]]]
,
If[(ToExpression[d]+ToExpression[e])==1," + "," + "<>ToString[(ToExpression[d]+ToExpression[e])]]
]<>"x "<>
If[(ToExpression[d]*ToExpression[e])<0," - "<>ToString[Abs[(ToExpression[d]*ToExpression[e])]]," + "<>ToString[(ToExpression[d]*ToExpression[e])]]
bL2="x"<>If[(ToExpression[f])<0," - "<>ToString[Abs[(ToExpression[f])]]," + "<>ToString[(ToExpression[f])]]

Print step by step solution

Print[
"log("<>ToString[aL1/aL2,TraditionalForm]<>") - "<>"log("<>ToString[bL1/bL2,TraditionalForm]<>")\n"<>
"log( "<>ToString[aL1/aL2,TraditionalForm]<>" ÷ "<>ToString[bL1/bL2,TraditionalForm]<>" )\n"<>
"log( "<>ToString[aL1/aL2,TraditionalForm]<>" × "<>ToString[bL2/bL1,TraditionalForm]<>" )\n"<>
"log( "<>ToString[aS,TraditionalForm]<>" × "<>ToString[ibS,TraditionalForm]<>" )\n"<>
"log( "<>ToString[lastLS,TraditionalForm]<>" )"
]

Function fSubOfLog

fSubOfLog[{a_,b_,c_,d_,e_,f_}]:=Module[{},
aS=(x+a)(x+b)/((x+f)(x+c));
aL=(x+a)(x+b);

aL1=If[(ToExpression[a]+ToExpression[b])==0,

"(x^2)"<>If[(ToExpression[a]*ToExpression[b])<0," - "<>ToString[Abs[(ToExpression[a]*ToExpression[b])]]," + "<>ToString[(ToExpression[a]*ToExpression[b])]]
,

"(x^2)"<>
If[(ToExpression[a]+ToExpression[b])<0,
If[(ToExpression[a]+ToExpression[b])==-1," - "," - "<>ToString[Abs[(ToExpression[a]+ToExpression[b])]]]
,
If[(ToExpression[a]+ToExpression[b])==1," + "," + "<>ToString[(ToExpression[a]+ToExpression[b])]]
]<>"x "<>
If[(ToExpression[a]*ToExpression[b])<0," - "<>ToString[Abs[(ToExpression[a]*ToExpression[b])]]," + "<>ToString[(ToExpression[a]*ToExpression[b])]]
];


aL2=If[(ToExpression[f]+ToExpression[c])==0,
"(x^2)"<>If[(ToExpression[f]*ToExpression[c])<0," - "<>ToString[Abs[(ToExpression[f]*ToExpression[c])]]," + "<>ToString[(ToExpression[f]*ToExpression[c])]]
,

"(x^2)"<>
If[(ToExpression[f]+ToExpression[c])<0,
If[(ToExpression[f]+ToExpression[c])==-1," - "," - "<>ToString[Abs[(ToExpression[f]+ToExpression[c])]]]
,
If[(ToExpression[f]+ToExpression[c])==1," + "," + "<>ToString[(ToExpression[f]+ToExpression[c])]]
]<>"x "<>
If[(ToExpression[f]*ToExpression[c])<0," - "<>ToString[Abs[(ToExpression[f]*ToExpression[c])]]," + "<>ToString[(ToExpression[f]*ToExpression[c])]]
];

bS=(x+d)(x+e)/((x+f));
(*ibs is inverse bs*)
ibS=((x+f))/((x+d)(x+e));
lastLS=ToString[(x+a)(x+b)/((x+c)(x+d)(x+e)),TraditionalForm];

bL1="(x^2)"<>
If[(ToExpression[d]+ToExpression[e])<0,
If[(ToExpression[d]+ToExpression[e])==-1," - "," - "<>ToString[Abs[(ToExpression[d]+ToExpression[e])]]]
,
If[(ToExpression[d]+ToExpression[e])==1," + "," + "<>ToString[(ToExpression[d]+ToExpression[e])]]
]<>"x "<>
If[(ToExpression[d]*ToExpression[e])<0," - "<>ToString[Abs[(ToExpression[d]*ToExpression[e])]]," + "<>ToString[(ToExpression[d]*ToExpression[e])]];
bL2="x"<>If[(ToExpression[f])<0," - "<>ToString[Abs[(ToExpression[f])]]," + "<>ToString[(ToExpression[f])]];


Print[
"log("<>ToString[aL1/aL2,TraditionalForm]<>") - "<>"log("<>ToString[bL1/bL2,TraditionalForm]<>")\n"<>
"log( "<>ToString[aL1/aL2,TraditionalForm]<>" ÷ "<>ToString[bL1/bL2,TraditionalForm]<>" )\n"<>
"log( "<>ToString[aL1/aL2,TraditionalForm]<>" × "<>ToString[bL2/bL1,TraditionalForm]<>" )\n"<>
"log( "<>ToString[aS,TraditionalForm]<>" × "<>ToString[ibS,TraditionalForm]<>" )\n"<>
"log( "<>ToString[lastLS,TraditionalForm]<>" )"
]
]

FINAL CHECKING OF FUNCTION  fSubOfLog

{a,b,c,d,e,f}={1,-1,1,1,-1,-1};
While[(ToExpression[a]+ToExpression[b])== 0 && (ToExpression[f]+ToExpression[c])== 0  && (ToExpression[d]+ToExpression[e])== 0 , 
{a,b,c,d,e,f}= nIntegers[Flatten[List[Range[-10,-1],Range[1,10]]],6]];
{a,b,c,d,e,f};(*remove ; to see coeficients and solution*)
fSubOfLog[{a,b,c,d,e,f}];(*list of coeficients is a list of string elements*)