(a) and (b):
There are two constant-acceleration segments in this problem, such that final velocity and final position of the first segment is the initial velocity and initial position of the second segment. Let us denote the quantities of the first and second segments by subscripts 1 and 2, respectively.
We point positive \(x \) axis from the initial point of the first segment towards the final point where the puck comes to rest. Using this coordinate system, we have the following knowns and unknowns for segment 1.
First Segment:
Suppressing units in calculations, we list knowns and unknowns.
\begin{align*}
\amp a_1 = - 3,\ \ t_1 = ?, \\
\amp x_{1,i} = 0,\ \ v_{1,i} = 40,\ \ x_{1,f} = 50,\ \ v_{1,f} = ?,
\end{align*}
The equation \(v_f^2 = v_i^2 + 2 a x \) gives
\begin{equation*}
v_{1,f}^2 = 40^2 + 2 \times (-3) \times 50 = 1600 - 300 = 1300.
\end{equation*}
This gives
\begin{equation*}
v_{1,f} = \pm 36.1\text{ m/s}.
\end{equation*}
Since the puck is moving in the same direction as the direction of the positive \(x \) axis, the positive root is the right choice here.
\begin{equation*}
v_{1,f} = + 36.1\text{ m/s}.
\end{equation*}
Now, using \(v_f = v_i + a t\text{,}\) we get
\begin{equation*}
t = \dfrac{v_f - v_i}{a} = \dfrac{36.1 - 40}{-3} = 1.3\text{ sec}.
\end{equation*}
Second Segment:
Let us use \(t_2 \) for \(t_{2,f} - t_{2,i}\) and place another origin at \(x_{2,i}\text{.}\)
\begin{align*}
\amp a_2 = - 12,\ \ t_2 = ?, \\
\amp x_{2,i} = 0,\ \ v_{2,i} = 36.1,\ \ x_{2,f} = ?,\ \ v_{2,f} = 0,
\end{align*}
Using \(v_f = v_i + a t\text{,}\) we get \(t\)
\begin{equation*}
t_2 = \dfrac{v_{2,f} - v_{2,i}}{a_2} = \dfrac{0 - 36.1}{-12} = 3.01\text{ sec}.
\end{equation*}
Using \(x = v_i t +\dfrac{1}{2}at^2\text{,}\) we get
\begin{equation*}
x_{2,f} = 36.1\times 3.01 +\dfrac{1}{2}\times(-12) \times 3.01^2 = 54.3\text{ m}.
\end{equation*}
(a) The total distance is \(50 + 54.3 = 104.3\text{ m}\text{.}\)
(b) The total time is
\begin{equation*}
t_1 + t_2 = 1.3 + 3.01 = 4.31\text{ sec}.
\end{equation*}