I am currently learning about ode's and I am on the topic of linear non-autonomous ode's. The professor is deriving the solution to the following ode using some integrating factor $I$.
$$\frac{dx}{dt} = A(t)x+B(t)$$
So these are the steps that he makes in finding $x$.
$$\begin{align} I\left(\frac{dx}{dt} - Ax = B \right) \\ I\frac{dx}{dt} - AIx = IB \\ I\frac{dx}{dt} - \frac{dI}{dt} x = IB \\ d(Ix) = IB \\ \frac{dI}{dt} = -AI \end{align}$$
I understand all of those steps and now, since this a simple ode we can separate it and arrive at solution for $I$ as
$$I = \exp (\int -Adt) = e^{-\int A}$$
Now, takes this solution of $I$ and uses it in $d(Ix) = IB$ by integrating both sides and subbing in $I$.
$$\begin{align} Ix &= \int IB \\ x &= \frac{1}{I} \int IB \\ x &= e^{\int A} (\int B e^{-\int A}) & \text{?!} \\ \end{align}$$
That last bit is where my confusion is. How did he arrive at the last step because if we sub in $I$, should it not be $\frac{1}{e^{-\int A}}$? Where did the negative go and why is it reciprocal?
Thanks!