How to find values such that the curves $y=\frac{a}{x-1}$ and $y=x^2-2x+1$ intersect at right angles? Problem:
Find all values of $a$ such that the curves $y = \frac{a}{x-1}$ and $y = x^2-2x+1$ intersect at right angles.
My attempt:
First, I set the two curves equal to each other:
$ \frac{a}{x-1} = x^2 - 2x + 1 $
$ \frac{a}{x-1} = (x-1)^2 $
$ \frac{a}{x-1}(x-1) = (x-1)^2(x-1) $
$ a = (x-1)^3 $
$ \sqrt[3] a = x-1 $
$ \sqrt[3] a + 1 = x $
​
I found the derivative of the first curve:
$ y = \frac{a}{x-1} $
$ y = a(x-1)^{-1} $
$ y' = -a(x-1)^{-2} $
$ y' = \frac{-a}{(x-1)^{2}} $
Then I found the derivative of the second curve:
$ y = x^2 - 2x + 1 $
$ y' = 2x - 2 $
Next, I multiplied them together and set them equal to -1:
$ \frac{-a}{(x-1)^{2}} ⋅ 2x - 2 = -1 $
$ \frac{-2ax + 2a}{(x-1)^2} = -1 $
$ \frac{-2a(x-1)}{(x-1)^2} = -1 $
$ \frac{-2a}{x-1} = -1 $
$ \frac{-2a}{x-1} ⋅ (x-1) = -1(x-1) $
$ -2a = -x+1 $
$ a = \frac{-x+1}{-2} $  
Now I am unsure how to finish the problem. Do I substitute what I found for $x$ into $ a = \frac{-x+1}{-2} $?
But my problem shows that there are two possible answers for $a$ so I am confused.  
Any help would be appreciated!
Thank you in advance!

Then,
$$\displaystyle a=\frac{X-1}2
a=(x-1)^3((\text{eq}
\frac{x-1}2=\frac{(x-1)^3}2
=\frac{(x-2)^2}2
2x^2-4x+2=1$$
So,
$$X=\frac{2+\sqrt 2}2, \frac{2-\sqrt 2}2$$
Put $x$ in eq $1$:
$$a= 2^{-\frac32}= \sqrt \frac 42$$
