Step 1: Use the standard reduction formula for $\displaystyle \int_{0}^{2\pi}\frac{\cos n\theta}{a+b\cos\theta}\,d\theta$. For $a > |b| > 0$ the result is
\[ \int_{0}^{2\pi}\frac{\cos n\theta}{a+b\cos\theta}\,d\theta = \frac{2\pi}{\sqrt{a^{2}-b^{2}}}\left(\frac{\sqrt{a^{2}-b^{2}}-a}{b}\right)^{n}. \]
Step 2: Here $a=5$, $b=4$, $n=2$. Compute $\sqrt{a^{2}-b^{2}}=\sqrt{25-16}=\sqrt{9}=3$.
Step 3: The prefactor is $\dfrac{2\pi}{3}$. The bracket is
\[ \frac{\sqrt{a^{2}-b^{2}}-a}{b} = \frac{3-5}{4} = \frac{-2}{4} = -\frac{1}{2}. \]
Step 4: Raise to the power $n=2$: $\left(-\tfrac12\right)^{2}=\tfrac14$.
Step 5: Multiply the pieces together:
\[ I = \frac{2\pi}{3}\cdot\frac{1}{4} = \frac{2\pi}{12} = \frac{\pi}{6}. \]
The two independent routes agree, confirming the value.
\[ \boxed{\, I = \dfrac{\pi}{6} \,} \]