Dianne W. answered 10/03/22
Professional Engineer PA, National Board Certification Physics
I am not sure what your question is but the function is incorrect. There is a 2 missing.
vy2 = voy2 + 2ayΔy where ay= -g and Δy = yf - yo
You were missing the 2.
At max height vy is zero ( vertical velocity at apex).

Dianne W.
10/04/22
Miko C.
I missed the 2, how to derive it?10/04/22