We can find the acceleration via
[tex]{v_f}^2-{v_i}^2=2a\Delta x[/tex]
We have
[tex]\left(5.20\dfrac{\rm m}{\rm s}\right)^2-\left(31.1\dfrac{\rm m}{\rm s}\right)^2=2a(115\,\mathrm m)[/tex]
[tex]\implies\boxed{a=-4.09\dfrac{\rm m}{\mathrm s^2}}[/tex]
Then by definition of average acceleration,
[tex]a_{\rm ave}=\dfrac{v_f-v_i}t[/tex]
so that
[tex]-4.09\dfrac{\rm m}{\mathrm s^2}=\dfrac{5.20\frac{\rm m}{\rm s}-31.1\frac{\rm m}{\rm s}}t[/tex]
[tex]\implies\boxed{t=6.33\,\mathrm s}[/tex]
We alternatively could have found the time without knowing the acceleration. Since acceleration is constant, the average velocity is
[tex]v_{\rm ave}=\dfrac{x_f-x_i}t=\dfrac{v_f+v_i}2[/tex]
Then
[tex]\dfrac{115\,\rm m}t=\dfrac{5.20\frac{\rm m}{\rm s}+31.1\frac{\rm m}{\rm s}}2[/tex]
[tex]\implies\boxed{t=6.33\,\mathrm s}[/tex]