That's almost right. When you integrate twice you pick up two arbitrary constants of integration. To really derive the formula you would have to solve the following initial value problem:
[tex]\frac{d^2y}{dt^2}=-g[/tex]
[tex]y(0)=0[/tex]
[tex]y'(0)=0[/tex].
Related Threads for: Wondering where the distance formula from acceleration due to gravity comes from