Classical mechanics
The second y-direction equation is used when the object is being affected by a separate acceleration, not by gravity. In this case, the y-component of the acceleration vector is needed. (Distance is not needed)