Hi Rom, I agreed with you when i first read the question but we interpreted it differently from intended.

This is a simplified school question. Perhaps we are intended to use calculus, or perhaps not.

I will do it without calculus.

The trajectory of a ball will be parabolic (pre-knowledge on my part). We are only interested in height and time.

The x does not refer to horizonal distance it refers to time and I am going to change it to a t make it less confusing.

So the ball is traveling in the path of a concave down parabola. (t,y) (time, height)

If you let the top of the building be the point (0,0) that is 0 time and 0 vertical height

then the ground will be ( 5,-25)

and the maximum height coordinates will be (2,20)

It is a concave down parabola and the t intercepts will be 0 and 4 (becasue it is symmetrical)

so the eqution must be

\(y=-a(t-0)(t-4)\\ y=-at(t-4)\\ When \;\;t=2,\;y=20\\ sub\\ 20=-a*2(2-4)\\ 20=-2a*-2\\ 20=4a\\ a=5\\ \text{So if the coordinates are set as I have described, I mean with the top of the buildng being height 0}\\ then\\~\\ y=-5t(t-4) \text{ Will model the path of the ball} \)

I hope that helps.