ĐKXĐ: \(x\ne\pm1\)
\(\Leftrightarrow\dfrac{2\left(x+2\right)}{x+1}=\dfrac{\left(x+1\right)^2+\left(x-1\right)^2}{\left(x+1\right)\left(x-1\right)}\)
\(\Leftrightarrow\dfrac{2\left(x+2\right)\left(x-1\right)}{\left(x+1\right)\left(x-1\right)}=\dfrac{2x^2+2}{\left(x+1\right)\left(x-1\right)}\)
\(\Leftrightarrow2\left(x+2\right)\left(x-1\right)=2x^2+2\)
\(\Leftrightarrow2x^2+2x-4=2x^2+2\)
\(\Leftrightarrow2x=6\Rightarrow x=3\)