If [tex]P(t)[/tex] is the country's population at the instant [tex]t[/tex], its variation over a small time interval [tex]\textrm{d}t[/tex] is given by:
[tex]\textrm{d}P = \dfrac{\textrm{d}P}{\textrm{d}t}\textrm{ d}t,[/tex]
where [tex]\dfrac{\textrm{d}P}{\textrm{d}t}[/tex] is the instantaneous rate of growth.
In the absence of both immigration and emigration, this rate of change is proportional to the population itself:
[tex]\dfrac{\textrm{d}P}{\textrm{d}t} = kP, \quad\textrm{with } k>0.[/tex]
When we consider only immigration at a constant rate, we get:
[tex]\dfrac{\textrm{d}P}{\textrm{d}t} = r, \quad\textrm{with } r>0.[/tex]
So over a small time interval [tex]\textrm{d}t[/tex], we have two contributions:
All in all, we get:
[tex]\textrm{d}P = kP\textrm{ d}t + r\textrm{ d}t \iff \dfrac{\textrm{d}P}{\textrm{d}t} = kP + r,[/tex]
which is the differential equation we were looking for.