We focus on the reasoning that leads to the differential equation. Then we look at the solution.
There are variations in the legal definition of APR. For simplicity, I will assume that in one year, $1$ dollar grows to $1+R$. The calculations below are readily modified if another meaning is assigned to $R$.
If there is continuous compounding at instantaneous rate $r$, then in one year $1$ dollar grows to $e^r$. Thus $e^r=1+R$, or equivalently $r=\ln(1+R)$. To repeat, $r$ is the instantaneous rate at which the money grows because of interest. It is not the same as $R$, although the two are numerically close when interest rates are low.
Let $x=x(t)$ be the amount of money in your account at time $t$, where $t$ is measured in years. We find an expression for $\frac{dx}{dt}$, the rate at which your money grows at time $t$.
Money is flowing into your account from two sources. They are (i) the continuous accrual of interest and (ii) the continuous deposits. The rate of accrual of interest, when we have $x$ in the bank, is $rx$. The rate at which money is deposited is $12S$. We arrive at the linear differential equation $\frac{dx}{dt}=rx+12S.$ There are various ways to solve the differential equation. The simplest is to fool around until you find something that works. General theory tells us that there is a unique solution for any given initial condition, so "guess and check" can be theoretically justified. Or else we can use a general method for separable equations, or for linear differential equations with constant coefficients. But it is simplest to make the change of variable $w=x+\frac{12S}{r}$. Then $\frac{dw}{dt}=\frac{dx}{dt}$. So our differential equation can be rewritten as $\frac{dw}{dt}=rw.$ This is the standard differential equation for exponential growth. It has general solution $w=Ce^{rt}.$ You specified the initial condition $x(0)=0$. Thus when $t=0$, we have $w=\frac{12S}{r}$; this is the value of $C$. It follows that $x(t)= \frac{12S}{r}\left(e^{rt}-1\right).$
Remark: If you really want an informal argument with "bare" differentials $dt$ and $dx$, imagine that time increases by a tiny amount $dt$. Then $x$ increases by an amount $dx$ made up of two parts. There is the accrual of interest, an amount roughly $r (x\,dt)$. And there is the amount deposited, which is $12S\,dt$. It is more complicated than that, since the part deposited towards the beginning of the short interval accrues interest, but this is exceedingly small even when compared to the two small main terms we have mentioned. We conclude (?) that $dx\approx (rx+12S)\,dt.$ Now divide both sides by $dx$, and we get to our differential equation. I do not see any advantage to this approach for our particular problem. It can be very good in an Engineering or Physics setting, once a great deal of physical intuition has been developed, and might be similarly useful in a very complex financial setting.