I don’t think you can enter (5/x - 7/(x + 1)) ((x + 1) - x)
and keep ((x + 1) - x) from evaluating to 1. So you’ll have to enter or evaluate some other expression.
Of course, if it’s allowed to enter something else, then entering -12 + (7 x)/(1 + x) + (5 (1 + x))/x will evaluate to the desired expression. This suggestion probably seems flip, but if something different is to be entered, I am far from understanding what differences are allowed and what differences are prohibited. Any help?
I also do not understand what sequence of algebraic operations you have mind that lead from (5/x - 7/(x + 1)) ((x + 1) - x) to -12 + (7 x)/(1 + x) + (5 (1 + x))/x. I could probably reverse-engineer something if I thought long and hard. Frankly, though, I don’t think it’s worth my time, when you probably already have something in mind that you could share.
This might be a good start: Inactivate[(5/x - 7/(x + 1)) ((x + 1) - x)]. Then you might be able to perform the structural operations you have mind. When done, then apply Activate[] to the transformed expression.
The operation involves treating
(
x
+
1
)
(x+1) and
x
x as separate entities and multiplying each with the terms inside the other parentheses, rather than computing
(
x
+
1
−
x
)
(x+1−x) first—which is how your code implements it. Thank you very much!