Cox-Ingersoll-Ross Model CIR model foresee (on the basis of structure of similar model) the following system:
$\left\{\begin{matrix}
\dot A(t,T)-a \gamma B(t,T)=0,     A(T,T)=0\\ 
\dot B(t,T)-aB(t,T)-\frac{\sigma^2}{2}(B(t,T))^2+1=0,      B(T,T)=0
\end{matrix}\right.$
with the second equation that is a Riccati's equation. 
Fixed $y(t):=\exp{\frac{\sigma^2}{2}\int_{t}^{T}B(s,T)ds}$ I obtain $B(t,T)=-\frac{2}{\sigma^2}\frac{y'}{y}$ and $\dot B= -\frac{2}{\sigma^2}\frac{y''}{y}+\frac{2}{\sigma^2}\frac{(y')^2}{y^2}$. 
It follows, from $\dot B$, the second linear ODE $2y''-2ay'-\sigma^2y=0$ with solutions $\lambda_{1,2}=\frac{a\pm h}{2}$(where $h:=\sqrt{a^2+2\sigma^2}$).
Let $\lambda_{1}:=x_{1}$ and $\lambda_{2}:=x_{2}$ i obtain $y=c_{1} \exp^{x_{1} \tau}+c_{2} \exp^{x_{2} \tau}$ and $y'=x_{1}c_{1} \exp^{x_{1} \tau}+x_{2}c_{2} \exp^{x_{2} \tau}$. 
Substituting in $B(\tau)$ (with tenor $\tau:=T-t$) results that $B(\tau)=-\frac{2}{\sigma^2}\frac{x_{1}c_{1} \exp^{x_{1} \tau}+x_{2}c_{2} \exp^{x_{2} \tau}}{c_{1} \exp^{x_{1} \tau}+c_{2} \exp^{x_{2} \tau}}$, and for $B(T,T):=0$ (with tenor $\tau=T-T=0$) results $B(0)=-\frac{2}{\sigma^2}\frac{x_{1}c_1+x_{2}c_{2}}{c_{1}+c_{2}}$. E
Explaining $c_1=-c_2\frac{x_{2}}{x_{1}}$ from $B(0)$, I obtain $B(\tau)=-\frac{2}{\sigma^2}\frac{x_{1}x_{2}[\exp^{(x_{2}-x_{1})\tau}-1]}{x_{1} \exp^{(x_{2}-x_{1})\tau}-x_{2}}$.
But since $x_{1}x_{2}=\frac{1}{4}(a^2-h^2)$ and $x_{2}-x_{1}=-h$, follows that:
$B(t,T):=B(\tau)=\frac{2 (\exp^{-h(T-t)}-1)}{2h+(a+h)(\exp^{-h(T-t)}-1)}$. 
Now I ask you. Substituting $B(t,T)$ in the first equation, that becomes 
$A(t,T)=-2a \gamma \int_{t}^{T}\frac{\exp^{-h(T-s)}-1}{2h+(a+h)(\exp^{-h(T-s)}-1)}$... 
How can i proof that $A$ can be written like 
$A(t,T)=-\frac{2a \gamma}{\sigma^2} \ln [\frac{2h \exp^{\frac{a+h}{2}(T-t)}}{2h+(a+h)(\exp^{-h(T-t)}-1)}]$?
How can I pass from the first expression of $A$ to the second?
Thanks for any help!
 A: That you can see from your first substitution. Insert $B=-\frac{2}{σ^2}\frac{\dot y}{y}$ into the first equation,
$$
\dot A=aγB=-\frac{2aγ}{σ^2}\frac{\dot y}{y}
$$
which can be directly integrated to
$$
A-A_0=-\frac{2aγ}{σ^2}(\ln|y|-\ln|y_0|).
$$

Taking $A_0$ and $y_0$ as the values at $t=T$ gives, as you found, $c_1λ_1+c_2λ_2=0$, and then
\begin{align}
A(t)&=-\frac{2aγ}{σ^2}\ln\left(\frac{c_1e^{λ_1(t-T)}+c_2e^{λ_2(t-T)}}{c_1+c_2}\right)\\
&=-\frac{2aγ}{σ^2}\ln\left(\frac{λ_2e^{λ_1(t-T)}-λ_1e^{λ_2(t-T)}}{λ_2-λ_1}\right)\\
&=-\frac{2aγ}{σ^2}\left(\frac a2(t-T)+\ln\left(\frac{(a+h)e^{-h/2(t-T)}-(a-h)e^{h/2(t-T)}}{h}\right)\right)
\\
&=-\frac{2aγ}{σ^2}\left(\frac a2(t-T)+\ln\left(\frac{h\cosh(\frac h2(T-t))+a\sinh(\frac h2(T-t))}{h}\right)\right)
\end{align}

From Viete we get $λ_1λ_2=-\frac{σ^2}2$. This can then be used in the computation of $B$.
\begin{align}
B(t)&=-\frac{2}{σ^2}\frac{c_1λ_1e^{λ_1(t-T)}+c_2λ_2e^{λ_2(t-T)}}{c_1e^{λ_1(t-T)}+c_2e^{λ_2(t-T)}}\\
&=-\frac{2λ_1λ_2}{σ^2}\frac{e^{λ_1(t-T)}-e^{λ_2(t-T)}}{λ_2e^{λ_1(t-T)}-λ_1e^{λ_2(t-T)}}\\
&=\frac{e^{h/2(t-T)}-e^{-h/2(t-T)}}{(a-h)e^{h/2(t-T)}-(a+h)e^{-h/2(t-T)}}
\\
&=\frac{\sinh(\frac h2(T-t))}{a\cosh(\frac h2(T-t))+h\sinh(\frac h2(T-t))}
\end{align}
