The two equations used in this problem is from the derived equations of rectilinear motion at a constant acceleration.
a = (v - v₀)/t
2ax = v² - v₀²
where
a is the acceleration
x is the distance
v is the final velocity
v₀ is the initial velocity
t is the time
Part a.) The acceleration is negative because it is moving downward: a = -4 m/s². The initial velocity is v₀ = 12 m/s and t is 3 s.
-4 = (v - 12)/3
v = 0 m/s
Thus, after 3 seconds the elevator comes to a stop.
Part b.)
2(-4)x = 0² - 12²
x = 18 m
The elevator has traveled a distance of 18 m within 3 seconds.