In a small time $dt$, the person will ingest $a\, dt$ of substance and will expel $k\, y\, dt$ of the substance. So $dy = a\, dt - k\, y\, dt$, or ${dy\over dt} = a - ky$.
Often when setting up differential equations, it helps to begin "In a small time $dt\dots$." Then construct the infinitesimal changes $dy$ in the dependent variable. Then divide through by $dt$ to form the differential equation.
Note that my "$k$" is different from yours (the units are different).