$\int _C \frac{\exp(z^2)}{z^2\left(z-1-i\right)}dz$, $C$ consists of $|z|=2$ counterclockwise and $|z|=1$ clockwise. 
$\int _C \frac{\exp(z^2)}{z^2\left(z-1-i\right)}dz$, $C$ consists of $|z|=2$ counterclockwise and $|z|=1$ clockwise.

Not sure where to begin and was wondering if anyone could give me a hint. I believe I would be using Cauchy's Integral Formula but figure out how to "split" the function, however both poles are in the contours.
Thanks.
 A: 
Method 1:- Note that you need to join this contours by a line that goes from $|z|=1$ to $|z|=2$ then it also goes backwards to close the circuit in order to apply Cauchy's Integral formula. But as it goes forward and backward it will have no effect on the integral.
The region enclosed is the annulus $1<|z|<2$ .
The only singularity of the function is at the point $z=1+i$ inside this annulus. (Note that $0$ is also a singularity but we don't care about it as we are only interested in the enclosed region which is the annulus).
And hence you have:-
$$\int_{C}\frac{\exp(z^{2})}{z^{2}(z-1-i)}dz=\int_{C}\frac{g(z)}{(z-i-1)}\,dz.$$
Now $g(z)$ is holomorphic inside the annulus and by Cauchy's Integral formula you have:-
$$\int_{C}\frac{g(z)}{(z-i-1)}\,dz=2i\pi g(1+i)=2i\pi\cdot\frac{\exp((1+i)^{2})}{(1+i)^{2}}.$$
Method 2:-
If you are asked to calculate the integral over both these contours and adding them up, it will be the same as integrating over the closed contour as I did above.
Now if you want to proceed by considering them as separate contours and adding the result up.
Then you will get by Cauchy Residue Theorem :-
$$\int_{|z|=2}\frac{\exp(z^{2})}{z^{2}(z-1-i)}dz=2i\pi 
 \Bigg(\text{Res}_{z=0}\frac{\exp(z^{2})}{z^{2}(z-1-i)} + \text{Res}_{z=1+i}\frac{\exp(z^{2})}{z^{2}(z-1-i)}\Bigg)$$
and $$\int_{|z|=1}\frac{\exp(z^{2})}{z^{2}(z-1-i)}dz=2i\pi 
 \Bigg(\text{Res}_{z=0}\frac{\exp(z^{2})}{z^{2}(z-1-i)}\Bigg).$$
Now the integral over $|z|=1$ is in the negative orientation so when you add it should be
$$\int_{|z|=2}\frac{\exp(z^{2})}{z^{2}(z-1-i)}dz-\int_{|z|=1}\frac{\exp(z^{2})}{z^{2}(z-1-i)}dz=2i\pi\Bigg(\text{Res}_{z=1+i}\frac{\exp(z^{2})}{z^{2}(z-1-i)}\Bigg)=\\2i\pi\cdot\frac{\exp((1+i)^{2})}{(1+i)^{2}}$$ as before.
So all in all the answer is
$$2i\pi\cdot \frac{1}{2i}e^{2i}=\pi\cdot e^{2i}.$$
