$$A:=\int_{}^{}{1\over 4x^2+4x+2}\,\mathrm{dx}= \underbrace{{1\over 2}\operatorname{arctg}\left(2x+1\right)+\text{const}}_{\text{I want to derive this.} } \tag{1}$$
$$4x^2+4x+2=(2x+1)^2+1\tag{2}$$
$$\therefore~~\int_{}^{}{1\over 4x^2+4x+2}\,\mathrm{dx}=\int_{}^{}{1\over(2x+1)^2+1}\,\mathrm{dx}\tag{3}$$
$$y:=(2x+1)\tag{4}$$
$$A=\int_{}^{}{1\over 1+y^2}\,\mathrm{dx}\tag{5}$$
$$\underbrace{\frac{\mathrm{d}}{\mathrm{dx}}\operatorname{arctg}\left(x\right)={1\over 1+x^2}}_{\text{general formula}}\tag{6}$$
$$\therefore~~A=\int_{}^{}{\mathrm{d}\over\mathrm{dy}}\left(\operatorname{arctg}\left(y\right)\right)\,\mathrm{dx}\tag{7}$$
$$\int_{}^{}{\mathrm{d}\over\mathrm{dy}}\left(\operatorname{arctg}\left(y\right)\right)\,\mathrm{dx}=\underbrace{{1\over 2}\operatorname{arctg}\left(y\right)+\text{const}}_{\text{How this can be derived?}}\tag{8}$$
The official book didn't notate$~y=2x+1~$by the way.
Let $2x+1=\tan\theta$. Then $\dfrac{1}{4x^2+4x+1}=\dfrac{1}{\sec^2\theta}$ and $2x\,dx=\sec^2\theta\,d\theta$
Therefore \begin{eqnarray} \int\dfrac{1}{4x^2+4x+2}\,dx&=&\frac{1}{2}\int\frac{1}{\sec^2\theta}\cdot\sec^2\theta\,d\theta\\ &=&\frac{1}{2}\theta+C\\ &=&\frac{1}{2}\arctan(2x+1)+C \end{eqnarray}