Since the acceleration is constant we know that it is given by:
[tex]a=\frac{v_f-v_0}{t}[/tex]from where we have that:
[tex]t=\frac{v_f-v_0}{a}[/tex]once we have this equation we can determine the time by plugging the values of the acceleration and velocities.
a)
In this case we have that:
[tex]t=\frac{31.5-21.5}{3.74}=2.67[/tex]Therefore it takes 2.67 s.
b)
In this case we have that:
[tex]t=\frac{61.5-51.5}{3.74}=2.67[/tex]Therefore it takes 2.67 s.