Intersection between $y=\frac{x^2+1}{x+1}$ and $y=x+2$ on $y$-axis I stumbled upon this problem: Considering the function $f:(-1;\infty)\rightarrow R$,  $$f(x)=\frac{x^2+1}{x+1}$$ Find the sum of the values on positive $y$-axis where the tangent of the function is perpendicular to the line $y=x+2$ 
After  letting $(0,a)$ be the point on positive $y$-axis, with the equation of the tangent $y-{{y}_{0}}=f'({{x}_{0}})(x-{{x}_{0}})$ gives slope to be  $-1$ So the tangent  is $y-a=-1(x-0)=-x$ 
Is this correct? Can you help me furthermore with this problem?
 A: First we are searching for all $x\in \Bbb R$, where $$f'(x)=-1\ ,$$
which is the condition to have in $X(x,f(x))$, point on the graph of $f$, a tangent perpendicular to some given line with slope $+1$.
The derivative of 
$$f(x)=\frac{x^2+1}{x+1}=\frac{x^2-1+2}{x+1}
=(x-1)+\frac{2}{x+1}\text{ is  }
f'(x)=1-\frac 2{(x+1)^2}\ .
$$
The equation $f'(x)=-1$ is $-\frac 2{(x+1)^2}=-2$, equivalently $(x+1)^2=1$, so it has exactly two solutions, $0,-2$.
Initial post:
The corresponding tangents through $(0,f(0))=(0,1)$ and $(-2,f(-2))=(-2,-5)$ have slope $-1$, equations $y=-x+1$, respectively $y=-x-7$, they hit $Oy$, (equation $x=0$,) at $$1,\ -7\ ,$$ the sum of these values is $-6$. 
Edited, thanks go to Sonkun: The point $-2$ is not in the domain of $f$, so $(0,1)$ is the only point to be considered, it is already on $Oy$, so the required sum of $y$-valuess on $Oy$ is $1$.
A: The searched equation of the Tangent line has the equation $$y=-x+n$$ to compute $n$ we Need to solve the equation $$-2x^2+x(n-1)+n-1=0$$ where the discriminant should equal to Zero.
Doing so we get $$(n-1)^2+8(n-1)=0$$ so $$(n-1)(n+7)=0$$
It is $$(-x+n)(x+1)=x^2+1$$
This equation must have only one Solutions, so the discriminant must be Zero.
A: $f(x)=\frac{x^2+1}{x+1}$
$\implies f'(x) = \frac{2x(x+1)-x^2-1}{(x+1)^2}$
$\implies f'(x) = \frac{2x^2+2x-x^2-1}{(x+1)^2}$
$\implies f'(x) = \frac{x^2-1+2x}{(x+1)^2}$
set this to $-1$ as tangent of $f(x)$ is perpendicular to $y=x+2$
$\frac{x^2-1+2x}{(x+1)^2}=-1$
$x^2-1+2x=-(x^2+1+2x)$
$2x^2+4x =0$
$2x(x+2)=0$
$\therefore x=0,-2$
So at $x=0,-2$ the tangents drawn will be perpendicular to the line $y-x+2$
On the OY axis lies $x=0,y=1$, So at the point $(0,1)$ the tangent of the function $f(x)$ is perpendicular to $y=x+2$
EDIT 1:
graph for reference 
