Reducing Algebra Fractions by -1

The book is trying to show me that reducing a fraction or adding two fractions sometimes only requires that -1 be factored from one or more denominators. Here is the example they give:

1.In the first step here I understand factoring out the "-" (the -1 value) because if the variable does not have a number coefficient we can assume its one so this part is fine.

2.Here

once we distribute the "-" we get a negative y and a positive x, therefore we can rearrange the denominator to match the numerator in

3.Next we have Now here is where I have a problem how can we know the values of both of these are 1 and -1? I am not certain how this is accomplished.

Does my logic up to 3's question look correct also?