The product of two numbers is x2+x−2. If one of the numbers is x−1, Then the other number is
x+2
The the other number be y.
Then, we must have, (x−1)×y = x2+x−2
⟹ y = x2+x−2x−1
We perform division as follows.
\( \begin{array}{l}\begin{array}{r}2 x-2 \\ -\quad+ \\ \hline 00\end{array} \\\end{array} \)
Hence y = x+2.