You started with
(x-3)/(x-1) = (x-4)/(x-5)
which is not the same as
x - 3/x - 1 = x - 4/x - 5
, the equation in the submission.