I suspect, then, that this is exercise is in preparation for introducing you to "residue"! (And, therefore, you should not use residues in doing the exercise.)
Since your function, 1/((z-a)(z-b)), is analytic everywhere except at a and b, you can change the contour as you please as long as it includes a and b and still get the same integral. Here's a standard way to do that: Use "partial fractions" to write the integrand as C/(z-a)+ D/(z-b). Now draw circles around a and b of radius r (small enough so that they stay inside the unit circle and don't cross each other. Draw two parallel straight lines very close together from the unit circle to the circle around a and another pair of straight lines from the unit circle to the circle around b. (It might help you to actuall draw this picture!) You should see that your contour has enclosed a region that does NOT have a and b inside it!
Now imagine starting at any point on the unit circle and integrating around the unit circle, counter-clockwise, until you reach one of those straight lines, integrate along that line to the small circle, around the small circle until you reach the second parallel line, then back to the unit circle. Notice that you have to integrate clockwise around that small circle in order to do that. Integrate along the unit circle until you get to the next straight line and repeat with that small circle, then back to your starting point.
The point of that exercise is to make you see that your contour consists of 8 parts: the two parts of the unit circle, the four straight lines from the unit circle to each of the small circles, and the two small circles. Since a and b are NOT inside that contour, the function is analytic inside the contour and the total integral (the sum of the integrals on all 8 pieces) is 0.
Now imagine moving those parallel lines closer and closer together. In the limit, you are integrating in both directions along the same line: one integral is the negative of the other and the total integral along each of the straight lines is 0. That leaves us with 4 pieces: The two integrals around the unit circle, which have no merged into just the unit circle, and the two small circles.
Let I be the integral (counterclockwise) around the unit circle and A and B be the integrals (counterclockwise) around the two small circles, centered on a and b respectively. Since you are integrating clockwise around the two small circles, their contribution is -A and -B. The total integral is I- A- B= 0 so I= A+ B. That is, the integral you want is the sum of the two integrals around the poles!
Of course, C/(z-a) is analytic inside the circle around b and D/(z-b) is analytic inside the circle around a so their contribution will be 0 to the respective integrals. You really have
I= \int_A\frac{Cdz}{z-a}+ \int_B\frac{Ddz}{z-b}
Let z= r e^{i\theta}+ a in the first integral and z= r e^{i\theta}+ b in the second (\theta measures the angle as you go around each circle) and you should find those integrals to be very simple (in fact, each integral IS the "residue" at that center point).