You have dP1/dt= kP1+ M1. That is a linear equation so we can divide it into two parts. dP1/dt= kP1 can be itegrated by rewriting it as dP1/P1= k dt and integrating both sides. You should find that P is an exponential function of t.
Then consider dP1/dt= kP1- 100 for t between 0 and 1. Looking for a constant soluton, P1= C, the derivative is 0 so we must have 0= kC- 100 of C= 100/k. Adding that to the exponential gives the general solution for 0< t< 1. To find the solution for t between 1 and 2, evaluate the first solution at t= 1 to get a condition so you can solve the same equation using that condition.
Yes, your solutions will be functions of k, not specific numbers.