(a) To find the velocity function, integrate the acceleration:
\(v = \int (12 - 2t) \, dt = 12t - \frac{2t^2}{2} + c = 12t - t^2 + c\)
Using the initial condition \(v(0) = -20\), we find \(c = -20\).
Thus, \(v = 12t - t^2 - 20\).
Set \(v = 0\) to find when P is at rest:
\(12t - t^2 - 20 = 0\)
\(t^2 - 12t + 20 = 0\)
Solving this quadratic equation gives \(t = 2\) and \(t = 10\).
The velocity-time graph is an inverted quadratic starting at \((0, -20)\) and ending at \((12, -20)\), with roots at \(t = 2\) and \(t = 10\).
(b) To find the total distance, integrate the velocity function:
\(s = \int_{0}^{12} (12t - t^2 - 20) \, dt\)
\(s = \left[ \frac{12t^2}{2} - \frac{t^3}{3} - 20t \right]_{0}^{12}\)
Calculate the definite integral in segments:
\(s = \left[ \frac{12(2)^2}{2} - \frac{(2)^3}{3} - 20(2) \right] + \left[ \frac{12(10)^2}{2} - \frac{(10)^3}{3} - 20(10) \right] - \left[ \frac{12(0)^2}{2} - \frac{(0)^3}{3} - 20(0) \right]\)
\(s = 18.7 + 85.3 + 18.7 = 123 \text{ m}\)