My Problem
José invests $\$2500$ of his $\$5000$ into an account with a $6\%$ annual interest rate, compounded continuously. If he continuously deposits an additional $3.5\%$ of his annual salary, which is currently $\$28000$ and will continuously increase by $1\%$ per year, what will José's salary, on-hand money (assuming no other other sources of income or expenditure), and account balance be at the end of twenty years?
My ODE Model
$\vec y' = \begin{cases}S' = \frac{1}{100}S \\ M' = (1 - \frac{7}{200})S \\ P' = \frac{7}{200}S + \frac{3}{50}P\end{cases}, \vec{y}(0) = \begin{bmatrix}28000 \\ 2500 \\ 2500\end{bmatrix}$, where $S$ is José's annual salary, $M$ is his on-hand money, and $P$ is his account balance.
The solution to this system would be $\vec y = \begin{bmatrix}28000e^{\frac{1}{100}t} \\ 2702000e^{\frac{1}{100}t} - 2699500 \\ 22100e^{\frac{3}{50}t} - 19600e^{t/100}\end{bmatrix}$, so after twenty years, José would earn $\$28000e^{1/5}$ per year, have on-hand $\$2702000e^{1/5} - \$2699500$, and have $\$22100e^{6/5} - \$19600e^{1/5}$ in his account.
I was a bit surprised that I had to make $P'$ a function of $S$ and $P$ instead of $M$ and $P$, since I envisioned the cash flowing from salary, to on-hand money, to account balance. I unintentionally ended up with more of a direct deposit system.
Is this the correct way to model such a problem as a system of ODEs?