I'm blocked in a step of getting to the equation $(7)$, more precisely in the step between $(5)$ and $(6)$. I show my way to solve it down, but I don't get the same as $(6)$, so I wanted to know if I was wrong and an explanation of the correct aproach. $$\ce{A ->[k_\mathrm{1}]I->[k_\mathrm{2}]P}$$
$$\frac{\mathrm d[\ce{A}]}{\mathrm dt} = -k_\mathrm{1}[\ce{A}] \tag{1}$$ $$\frac{\mathrm d[\ce{I}]}{\mathrm dt} = k_\mathrm{1}[\ce{A}] -k_\mathrm{2}[\ce{I}] \tag{2}$$ $$\frac{\mathrm d[\ce{P}]}{\mathrm dt} = k_\mathrm{2}[\ce{I}] \tag{3}$$
$$[\ce{A}]_\mathrm{0}\neq0 ; [\ce{I}]_\mathrm{0}=0; [\ce{P}]_\mathrm{0}=0$$ $$[\ce{A}]=[\ce{A}]_\mathrm{0}e^{-k_\mathrm{1}t} \tag{4}$$
$$\frac{\mathrm d[\ce{I}]}{\mathrm dt} = k_\mathrm{1}[\ce{A}]_\mathrm{0}e^{-k_\mathrm{1}t} -k_\mathrm{2}[\ce{I}] \tag{5}$$
$$[\ce{I}]=\frac{k_\mathrm{1}}{k_\mathrm{2}-k_\mathrm{1}}(e^{-k_\mathrm{1}t}-e^{-k_\mathrm{2}t})[\ce{A}]_\mathrm{0} \tag{6}$$
$$[\ce{A}]_\mathrm{0}=[\ce{A}]-[\ce{I}]-[\ce{P}]$$ $$[\ce{P}]=[\ce{A}]-[\ce{A}]_\mathrm{0}-[\ce{I}]$$
$$[\ce{P}]=(\frac{k_\mathrm{1}e^{-k_\mathrm{2}t}-k_\mathrm{2}e^{-k_\mathrm{1}t}}{k_\mathrm{2}-k_\mathrm{1}}+1)[\ce{A}]_\mathrm{0} \tag{7}$$
And here is what I've done:
$$\int_{0}^{[\ce{I}]} \, \mathrm{d}[\ce{I}]=k_\mathrm{1}[\ce{A}]_\mathrm{0}\int_{0}^{t}e^{-k_\mathrm{1}t} \, \mathrm{d}t-k_\mathrm{2}[\ce{I}]\int_{0}^{t} \, \mathrm{d}t \tag{A}$$
$${[\ce{I}]}=-e^{-k_\mathrm{1}t}[\ce{A}]_\mathrm{0}-k_\mathrm{2}t[\ce{I}] \tag{B}$$
$${[\ce{I}]}=-[\ce{A}]_\mathrm{0}(\frac{e^{-k_\mathrm{1}t}}{k_\mathrm{2}t+1}) \tag{C}$$
Anyone could help me? Thanks :)