The signal is $x(t)=A\cos(\omega_ot+\theta)$ and the average power formula is $$ P_\infty = \lim\limits_{T\rightarrow \infty} \frac{1}{2T+1} \int_{-T}^{T} |x(t)|^2 dt $$ My approach is
The answer in the book is $P_{\infty}= \dfrac{A^2}{2}$ but I'm not able to reach to this result. As far as I can see from my approach is the following equation must hold but I can't prove it. $$ \frac{\sin(2\omega_o T)\cos(2\theta)}{w_o} = 1 $$

Here's the intuition to understand the result. First of all, $$\int_{-\pi}^{\pi}\cos^2t\,dt = \pi, \quad\text{so}\quad \int_{-\pi}^{\pi} \cos^2(ct)\,dt = \pi \quad\text{for any } c>0.$$ It follows that $$\int_{-n\pi}^{n\pi}\cos^2(ct)\,dt = n\pi \quad\text{for any positive integer }n,$$ and so $\lim_\limits{n\to\infty} \dfrac1{n\pi}\displaystyle\int_{-n\pi}^{n\pi}\cos^2(ct)\,dt = 1$. If $n\pi\le T<(n+1)\pi$, since the integrand $\cos^2(ct)\ge 0$, it follows that $$n\pi\le\int_{-T}^T \cos^2(ct)\,dt < (n+1)\pi$$ and so $$\frac{n\pi}T \le \frac1T\int_{-T}^T \cos^2(ct)\,dt < \frac{(n+1)\pi}T.$$ As $T$ varies, let $n=n_T=[T/\pi]$. So as $T\to\infty$, $n_T\to\infty$ and we see that $1\le\frac{n_T\pi}T<\frac{(n_T+1)\pi}T <1+\frac{\pi} T$, and so, letting $T\to\infty$, by the squeeze theorem, $$\lim_{T\to\infty}\frac1T\int_{-T}^T \cos^2(ct)\,dt = 1.$$
**** Alternatively, to finish the derivation given in the OP (ignoring the factor of $A^2/2$ until the end), we again apply the squeeze theorem. Note that $$\left|\frac{\sin(2\omega_0T)\cos(2\theta)}{\omega_0}\right|\le \frac1{|\omega_0|},$$ and so $$\left|\frac1T\frac{\sin(2\omega_0T)\cos(2\theta)}{\omega_0}\right|\le \frac1{|\omega_0|}\frac1T \to 0 \quad\text{as } T\to\infty,$$ and so $\lim\limits_{T\to\infty}\dfrac1T\dfrac{\sin(2\omega_0T)\cos(2\theta)}{\omega_0} = 0$. Likewise, $\lim\limits_{T\to\infty}\dfrac1{2T+1}\cdot\dfrac{\sin(2\omega_0T)\cos(2\theta)}{\omega_0} = 0$. Thus, \begin{align*} \lim_{T\to\infty} &\frac{A^2}{2(2T+1)}\left(2T+\frac{\sin(2\omega_0T)\cos(2\theta)}{\omega_0}\right) \\&= \frac{A^2}2 \left(\lim_{T\to\infty} \frac{2T}{2T+1} + \lim_{T\to\infty}\frac1{2T+1}\frac{\sin(2\omega_0T)\cos(2\theta)}{\omega_0}\right) \\ &= \frac{A^2}2(1+0)= \frac{A^2}2. \end{align*}