I can't find the solution of $\lim_{x\rightarrow 0} \left(1+\frac{x}{(x-1)^2}\right)^{\frac{1}{\sqrt{1+x}-1}}$ I can't find the solution of
$$\lim_{x\rightarrow 0} \left(1+\frac{x}{(x-1)^2}\right)^{\frac{1}{\sqrt{1+x}-1}}$$
Computing for $x$ goes to $0$ it gives a $1^\infty$ type of indeterminate form. I tried to solve it by making it similar to $0/0$ type of indeterminate form by taking log of both sides and writing as
$$\frac{\ln\left(1+\frac{x}{(x-1)^2}\right)}{\sqrt{1+x}-1}$$
Then I applied L'Hôpital's rule to find the limit and find it infinity for $0^+$ and $0$ for $0^-$ but my solution did not match with the answer.
Thanks for help!

Given
$$\lim_{x\rightarrow 0} \left(1+\frac{x}{(x-1)^2}\right)^{\frac{1}{\sqrt{1+x}-1}}$$ we have with $u= e ^{ \ln u}$,
$$ \lim_{x \to 0} \left(\frac{x}{\left(x - 1\right)^{2}} + 1\right)^{\frac{1}{\sqrt{x + 1} - 1}}  =  \lim_{x \to 0} e^{\ln{\left(\left(\frac{x}{\left(x - 1\right)^{2}} + 1\right)^{\frac{1}{\sqrt{x + 1} - 1}} \right)}} =$$
$$= \lim_{x \to 0} e^{\ln{\left(\left(\frac{x}{\left(x - 1\right)^{2}} + 1\right)^{\frac{1}{\sqrt{x + 1} - 1}} \right)}}  = \lim_{x \to 0} e^{\frac{\ln{\left(\frac{x}{\left(x - 1\right)^{2}} + 1 \right)}}{\sqrt{x + 1} - 1}} $$
Since we have an indeterminate form of type $\left(\frac 00\right)$, we can apply the l'Hopital's rule:
$$e^{ \lim_{x \to 0} \frac{\frac{d}{dx}\left(\ln{\left(\frac{x}{\left(x - 1\right)^{2}} + 1 \right)}\right)}{\frac{d}{dx}\left(\sqrt{x + 1} - 1\right)}}  = e^{ \lim_{x \to 0} \frac{2 \sqrt{x + 1} \left(- \frac{2 x}{\left(x - 1\right)^{3}} + \frac{1}{\left(x - 1\right)^{2}}\right)}{\frac{x}{\left(x - 1\right)^{2}} + 1}}= $$
$$=e^{ \lim_{x \to 0} \frac{2 \sqrt{x + 1} \left(- \frac{2 x}{\left(x - 1\right)^{3}} + \frac{1}{\left(x - 1\right)^{2}}\right)}{\frac{x}{\left(x - 1\right)^{2}} + 1}}  = e^{ \lim_{x \to 0}\left(- \frac{2 \left(x + 1\right)^{\frac{3}{2}}}{\left(x - 1\right) \left(x + \left(x - 1\right)^{2}\right)}\right)}= e^{2} $$
