I assume that you know how to solve quadratic equations and how to do general algebraic transformations.
If not, please post a separate request for an OTA to explain one or both of these subjects.
You should have in you book or course notes a formula telling how much time does it take an object to travel distance H (which we take to be the height of the building) starting from velocity 0 and having constant acceleration g.
In case you do not find this formula, I derive it here:
Let X-axis be directed downwards.
The melon starts from x0 = 0 with ...
The expert examines the straight motion of a watermelon dropped from roof sound splash.