Hello, twohaha!
\(\displaystyle \text{Let }u \,=\,\sqrt{x+2} \quad\Rightarrow\quad x \:=\:u^2-2 \quad\Rightarrow\quad dx \,=\,2u\,du\)
\(\displaystyle \displaystyle\text{Substitute: }\:\int \frac{2u\,du}{u^2-2 + u} \;=\;\int\frac{2u\,du}{u^2+u-2} \;=\;\int\frac{2u\,du}{(u-1)(u+2)}\) ===> sign error (see below)
\(\displaystyle \text{Partial Fractions: }\:\dfrac{2u}{(u-1)(u+2)} \:=\:\dfrac{A}{u-1} + \dfrac{B}{u+2}\)
. . . . . . . . . . . . . . . \(\displaystyle 2u \;=\;A(u+2) + B(u-1)\)
\(\displaystyle \begin{array}{cccccc}\text{Let }u=1: & 2 \:=\:A(3) + B(0) & \Rightarrow & A = \frac{2}{3} \\ \text{Let }u = \text{-}2: & \text{-}4 \:=\:A(0) + B(\text{-}3) & \Rightarrow & B = \frac{4}{3} \end{array}\)
\(\displaystyle \text{Hence: }\:\dfrac{2u}{(u-1)(u+2)} \;=\;\dfrac{\frac{2}{3}}{u-1} + \dfrac{\frac{4}{3}}{u+2}\)
\(\displaystyle \displaystyle\text{We have: }\:\tfrac{2}{3}\int\frac{du}{u-1} + \tfrac{4}{3}\int\frac{du}{u+2} \;=\;\tfrac{2}{3}\ln|u-1| + \tfrac{4}{3}\ln|u+2| + C \)
\(\displaystyle \text{Back-substitute: }\:\frac{2}{3}\ln\left|\sqrt{x+2} - 1\right| + \frac{4}{3}\ln\left|\sqrt{x+2}+2\right| + C\)