Multiply across, keeping everything factored.
x−1x+4⋅x+7x−1=(x−1)(x+7)(x+4)(x−1)
The factor x−1 appears on the top and on the bottom, so it cancels.
(x−1)(x+7)(x+4)(x−1)=x+7x+4
The restrictions x=1 and x=−7 are carried along from the original denominators.