I am supposed to compute this integral $$\int_\gamma \left(\frac{1}{z}+\frac{1}{z^2}\right)dz$$ along the triangle-shaped path $\gamma$ having vertices at points $2+i$,$-2+3i$ and $-1-i$.
EDIT: Fixed
Replacing the closing triangular path with unit circle:
$z(t)=e^{it}$, $dz=ie^{it}dt$ with $0 \leq t \leq 2\pi$.
Now
$$\begin{align}
\int_\gamma \left(\frac{1}{z}+\frac{1}{z^2}\right)dz&=\int_0^{2\pi}(e^{-it}+e^{-2it})ie^{it}dt\\
&=\int_0^{2\pi}i+ie^{-it}dt\\
&=i\int_0^{2\pi}dt-\int_0^{2\pi}(-i)e^{-it}dt\\
&=|_0^{2\pi}t-|_0^{2\pi}e^{-it}\\
&=2\pi i-(e^{-2\pi i}-1)\\
&=2\pi i.
\end{align}$$
Your integration of $1/z$ is not correct. Read the answers to this question: ln(z) as antiderivative of 1/z
Alternative approach. Recall the Cauchy's integral theorem. Does the given triangle-shaped closed path $\gamma$ contain in its interior the pole $z=0$ of the integrand function $f(z)=\frac{1}{z}+\frac{1}{z^2}$?
If the answer is no then $\int_\gamma f(z)dz=0$. If the answer is yes then $\int_\gamma f(z)dz=\int_{C} f(z)dz$ where $C$ is the unit circle $|z|=1$ oriented counterclockwise (which is easier to evaluate).