<s>[INST] Show that $\int_0^{\pi/2}\frac{\sin x\cdot \cos x}{x+1}dx=\frac12(\frac12+\frac1{\pi +2}-A)$ 
Show that $\int_{0}^{\pi/2}\frac{\sin x\cdot \cos x}{x+1}dx=\frac{1}{2}(\frac{1}{2}+\frac{1}{\pi +2}-A)$
  where $A=\int_0^\pi\frac{\cos x}{(x+2)^2}dx$.

I tried using partial integration on the integral $\int_0^{\pi/2}\frac{\sin x\cdot \cos x}{x+1}dx$ but I am in no luck. Also tried using $\frac12A=\int_0^{\pi/2}\frac{\cos x}{(x+2)^2}dx$. But still something is going wrong . Please suggest. 
The best I could think of is :
$\int {\dfrac{sin2x}{2x+2}dx}=-\dfrac{1}{2x+2}cos2x+\dfrac{1}{4}\int {\dfrac{cos2x}{(x+1)^2}dx}$
Notice carefully that $\int_0^\pi\frac{\cos x}{(x+2)^2}dx$ has the same structure as $\int {\dfrac{cos2x}{(x+1)^2}dx}$
P.S.  See I purposefully avoided the long details of my efforts as that would hamper the understandibility of the problem and may mislead the answerer as well.
 [/INST] Just a couple of tiny missteps by the OP.
\begin{align*}
\mathcal{I} \equiv\int_0^{\pi/2} \frac{ \sin x \cos x}{x+1}\,\mathrm{d}x &= \int_0^{\pi/2} \frac{ \sin 2x }{2x+2}\,\mathrm{d}x \tag*{, then denote $u = 2x$} \\
&= \frac12\int_0^{\pi} \frac{ \color{blue}{\sin u} }{u+2}\,\color{blue}{\mathrm{d}u} \tag*{, then by-part ...} 
\end{align*}
... let $\color{blue}{\sin u \,\mathrm{d}u}$ go together
\begin{align*}
\mathcal{I} &= \frac12 \left[ \frac{ -\cos u }{u+2}\Bigg|_0^{\pi} - \int_0^{\pi} (-\cos u) \cdot \frac{ -1 }{ (u+2)^2 }\,\mathrm{d}u\right ] \\
&= \frac12 \left[ \frac1{ \pi + 2} - \frac{-1}{2} - \int_0^{\pi} \frac{ \cos u}{ (u+2)^2 }\,\mathrm{d}u\right]
\end{align*}
which is the desired result.
</s>