The original question asks to use the residue theorem to find: $\int_0^\pi \frac{64d\theta}{(5+3cos\theta)^2} $
And by replacing $\theta$ with z's and cleaning up, I get $\frac1i\int_0^\pi \frac{246z dz}{(z+3)^2(3z+1)^2}$
Now, after taking a look at $f(z)$, there are two singularity points both of order 2 at the poles z=-3,-$\frac13$
Wolfram confirms to me that the residue at the point z=-3 is -5, but it's also saying that the residue at z=-1/3 is 5, which goes against whenever I get 45.
I'm getting the derivative after you multiply $f(z)$ by $(3z+1)^2$ to be: $\frac{-256(z-3)}{(z+3)^2}$ with the limit being z going to -1/3
What am I doing wrong in that last bit?
If I am reading you correctly, you are considering both poles in the computation of the integral. That is a mistake; you only compute the residue for the pole inside the circle. I will work out the general case from which you can compute the value of your integral.
To wit, consider the integral
$$\int_0^{\pi} \frac{d\theta}{(a+b \cos{\theta})^2}$$
where $a>b>0$. Using the substitution $z=e^{i \theta}$, we get the following contour integral:
$$-i \frac{2}{b^2}\oint_{|z|=1} \frac{z \, dz}{(z^2+2 (a/b) z+1)^2}$$
The integrand has double poles at
$$z_{\pm} = -\frac{a}{b} \pm \sqrt{\left(\frac{a}{b}\right)^2-1}$$
so we may rewrite the integral as
$$-i \frac{2}{b^2}\oint_{|z|=1} \frac{z \, dz}{(z-z_+)^2 (z-z_-)^2}$$
Now, because $a>b>0$, $|z_-|>1$ and $|z_+|<1$. Therefore only the pole at $z_+$ is within the integration contour and we only consider the residue at this pole - and not at $z=z_-$ - for computing the value of the integral. Thus, by the residue theorem,
$$\begin{align}\int_0^{\pi} \frac{d\theta}{(a+b \cos{\theta})^2} &= i 2 \pi \left ( -i \frac{2}{b^2}\right ) \text{Res}_{z=z_+} \frac{z}{(z-z_+)^2 (z-z_-)^2}\\ &= \frac{4 \pi}{b^2} \left [\frac{d}{dz} \frac{z}{(z-z_-)^2} \right ]_{z=z_+}\\ &= \frac{4 \pi}{b^2} \left [\frac{-(z_+ + z_-)}{(z_+-z_-)^3}\right ] \\ &= \frac{4 \pi}{b^2} \frac{2 (a/b)}{8 [(a/b)^2-1]^{3/2}}\end{align}$$
Thus,
$$\int_0^{\pi} \frac{d\theta}{(a+b \cos{\theta})^2} = \pi a (a^2-b^2)^{-3/2}$$
Going back to your specific problem:
$$64 \int_0^{\pi} \frac{d\theta}{(5+3 \cos{\theta})^2} = 64 \cdot 5 \pi (5^2-3^2)^{-3/2} = 5 \pi$$