Interesting questions.
Can you assume that the interest is also earned continuously (at the given annual rate of $r$)? If so, then a possible starting point might be:
$$\begin{align}
\frac{dM}{dt}&=k+rM\\
\int_P^M\frac1{k+rM}dM&=\int_0^t dt\\
\frac1r\ln\frac{k+rM}{k+rP}&=t\\
M(t)&=\left(P+\frac kr\right)e^{rt}-\frac kr\end{align}$$
That was for part (a).
For part (b), the total principal injected from over $t$ years, including the initial sum, is $P+kt$. Hence amount earned in interest is
$$\begin{align}
M(t)-(P+kt)&=\left(P+\frac kr\right)e^{rt}-\frac kr-(P+kt)\\
&=\left(P+\frac kr\right)(e^{rt}-1)-kt
\end{align}$$
with annual compounding:
$\Sigma_t[S_1r(1+g)^{t-1}(1+i)^{T-t}]$
with other compounding frequencies:
$\Sigma_t[\Sigma_x[\frac{S_1r(1+g)^{t-1}}{m}(1+\frac{i}{m})^{(m-x)}](1+\frac{i}{m})^{[m(T-t)]}]$
but that's probably what you referred to as sum of finite series... nevertheless, it's quite a short expression, I think, do you really need an integral here? Sorry for asking naively..
Derivation of the above:
First simplified, with annual payments.
Timeline:
$t = 0$ Lisa starts working
$t = 1$ Lisa gets her first annual salary, and makes the first payment into her savings account.
$t= T = 40$ Lisa retires. So she makes the last payment in $t=40$ (still one payment into the account from the last salary at the retirement date)
She works 40 years, makes 40 payments, and retires 39 years after the first payment.
The annual payment $P(t)$ is her savings rate $r=10%$ times her salary $S_t$ which is 40 K at the end of the first year, i.e. $S_1=40,000$ and then grows with $g=$5% per year, i.e.:
$P_t = S_1r(1+g)^{t-1}$
Payments into her savings account grow at an annual interest rate of $i=7$%, so the value at the retirement date ($T$) of a payment made in $t$ is:
$FV_{S_t}=S_tr(1+i)^{(T-t)}=S_1r(1+g)^{t-1}(1+i)^{T-t}$
The total value of the account is the sum over $t$ till $t=40$:
$\Sigma_tFV_{P_t}=$
$\Sigma_t[S_tr(1+i)^{(T-t)}]=$
$\Sigma_t[S_1r(1+g)^{t-1}(1+i)^{T-t}]=$
$\Sigma_t4,000(1.05)^{t-1}(1.07)^{40-t}$
with other compounding frequency:
number of compounding (sub)periods per year:
index for current subperiod (here months): $x$ $(1,2,...,12)$
$\Sigma_t[\Sigma_x[\frac{S_1r(1+g)^{t-1}}{m}(1+\frac{i}{m})^{(m-x)}](1+\frac{i}{m})^{[m(T-t)]}]$
Best Answer
Edit:
$D = 1000+500t$
$P' = 0.06P+1000+500t$
Solving this would give
https://www.wolframalpha.com/input/?i=p%27(t)+%3D+0.06p%2B1000%2B500t
$p(t) = c_1e^{0.06t} - 8333.33t -155556$
$p(0) = c_1 - 155556 = 1000$
$c_1 = 156556$
Now $p(t) = 156556e^{0.06t} - 8333.33t - 155556$
Now $p(10) = 46374$