Kinematic Equations

A firework goes flying up into the air from the ground and reaches a maximum height of 40m (and falls back down to the ground). What is the total time it stays in the air?

During, Physics class, we were introduced to kinematic equations and solving this kind of questions. This new concept is very useful to understand how objects moves, relevant to time, distance, accelerations and velocity.
With three essential equations:

$a&space;=&space;\frac{v_{f}-v_{i}}{t}$
$d&space;=&space;v_{avg}&space;\times&space;t$
$v_{avg}&space;=&space;\frac{\left&space;(&space;v_{f}&space;-&space;v_{i}\right)}{2}$

We can use algebra rules and formed into four kinematic equations:

$v_{f}&space;=&space;v_{i}&space;+&space;at$

$d&space;=&space;\left&space;(&space;\frac{v_{i}&space;+&space;v_{f}}{2}&space;\right&space;)&space;\times&space;t$

$d&space;=&space;v_{i}t&space;+\frac{1}{2}at^{2}$

$v_{f}^{2}&space;=&space;v_{i}^{2}&space;+&space;2ad$

In kinematic problems questions, we would need to use one of the equation to solve the problems.